This usually happens because your environment has changed since running 解决方案
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 14.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
at module.exports (YOUR_PROJECT_PATH/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (YOUR_PROJECT_PATH/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (YOUR_PROJECT_PATH/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (YOUR_PROJECT_PATH/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at getDefaultSassImplementation (YOUR_PROJECT_PATH/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10)
at getSassImplementation (YOUR_PROJECT_PATH/node_modules/sass-loader/dist/getSassImplementation.js:19:72)
at Object.loader (YOUR_PROJECT_PATH/node_modules/sass-loader/dist/index.js:40:61)
@ ./src/ui/styles/global.scss 2:26-143
@ ./src/ui/App.tsx
@ ./src/ui/index.tsx
执行如下指令:
(cnmp) 或 npm install -g cnpm
(cnmp) 或 cnpm install
(cnmp)或 npm install node-sass
下载之后,运行项目,依然报错,于是开始百度,按照其他网友的指示,再执行一次 ***npm update***来更新项目里的依赖包,然后,大功告成。
一定要执行 npm update