打开项目 执行 npm i 报了一大堆错.
看到有node-sass字样,然后用的node版本是v16.12.0.

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 (E:\code\xxproject\node_modules\node-sass\lib\binding.js:15:13)
at Object.<anonymous> (E:\code\xxproject\node_modules\node-sass\lib\index.js:14:35)
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",

想到以前的node版本较低时可以安装.

nvm切换node版本到12.16.2 ,再安装就可以了.

nvm 安装:

1.https://zhuanlan.zhihu.com/p/366059754

2.http://nvm.uihtm.com

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐