Closed ghost closed 6 years ago
I'm guessing it's a problem with n
.
node-sass
compiles as a binary that's specific to the installed Node version. If you are using n
to switch that version, it might change the compilation target and therefore fail to run.
Try running it with regular node. If that doesn't work, try npm rebuild
in your project folder to rebuild all binaries.
Feel free to re-open if you're still having trouble.
Thank you for your quick response! n was to address another issue. because the latest node is at 10, it went into some error complaining 10 is not supported. which node version are you using?
Yes, after "npm rebuild", it works now. Thanks a lot! I am new. Thank you for helping on the basics!
no probs!
Failed to compile.
(undefined) ./node_modules/css-loader?{"minimize":false,"localIdentName":"[local]-[hash:base64]","importLoaders":1,"sourceMap":true,"modules":true}!./node_modules/postcss-loader/lib?{"sourceMap":true}!./node_modules/resolve-url-loader!./node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./src/components/stats.scss Module build failed: Error: ENOENT: no such file or directory, scandir '/Users/xiangzhu/proj/try0/node_modules/node-sass/vendor' at Object.fs.readdirSync (fs.js:921:18) at Object.getInstalledBinaries (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/extensions.js:128:13) at foundBinariesList (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/errors.js:20:15) at foundBinaries (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/errors.js:15:5) at Object.module.exports.missingBinary (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/errors.js:45:5) at module.exports (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/binding.js:15:30) at Object. (/Users/xiangzhu/proj/try0/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xiangzhu/proj/try0/node_modules/babel-register/lib/node.js:152:7)
@ ./src/components/stats.scss 4:14-247 18:2-22:4 19:20-253
@ ./src/components/stats.js
@ ./src/components/main/index.js
@ ./src/app.js
@ ./kit/entry/browser.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://localhost:8080/ webpack/hot/only-dev-server ./kit/entry/browser.js
Here are the commands. 189 npm i -g reactql 190 reactql new 191 cd proj/try0/ 192 ls 193 npm start 194 npm install -g n 195 n 9 196 sudo n 9 197 npm start