项目打开先npm i,再cnpm i。。。。。

是在npm installnpm run dev时报错的

Module build failed: Error: Cannot find module 'node-sass':找不到node-sass

cnpm install安装后就可以了没这个报错,但报错:

Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime

编译某个vue文件失败,因为构造Module失败,node sass 不支持当前环境【主要是node 】

 

解决办法可以把node-sass重装一遍就好了

1 npm uninstall --save node-sass  
2 npm install --save node-sass

 

如果还不行,先npm i 再cnpm i 再npm uninstall --save node-sass再npm install --save node-sass,最后npm run dev运行成功!!!

 

如果还不行,

用npm install -g cnpm --registry=https://registry.npm.taobao.org ,从淘宝镜像那下载,然后cnpm i下载成功。

最后输入cnpm install node-sass --save

 

相关文章:

  • 2021-12-27
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案