今天用vue做一个小demo,创建项目的时候发现报了两个错,my god!!
创建项目的时候竟然都能出错,一个是Error: Cannot find module 'node-sass'
说找不到node-sass,和Error: Can't find Python executable "python"
,这可不能忍,于是我马上打开了度娘,翻到了一个博客,照着上面说的方法尝试。
具体解决方法:
1.在项目目录cmd下运行 npm install -g cnpm --registry=https://registry.npm.taobao.org
2.下载成功后再运行 cnpm install node-sass
两步完美解决
参考博客地址:https://blog.csdn.net/sliver1836/article/details/95950284