安装node-saas包报错问题

项目中用到一些sass写的样式,但是每次一编译就报错

按照它上面的提醒,npm rebuild node-sass --force,还是一样有错。不过仔细看看他的错误信息我发现了其中这条:

gyp verb could not find "C:\Users\myh\AppData\Local\Programs\Python\Python36\python.EXE". checking python launcher
gyp verb could not find "C:\Users\myh\AppData\Local\Programs\Python\Python36\python.EXE". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\myh\AppData\Local\Programs\Python\Python36\python.EXE", you can set the PYTHON env variable.

哈哈,这下知道了,也就是说我本地没有Python环境变量,卧槽,这个node-sass是依赖python写的吗?

带着疑惑,我下载了最新的python安装了,然后按照上面说的配置了一下环境变量:

 

接着,带着忐忑的心情,敲下:npm install node-sass --save 

耶,安装成功!!!

继续编译了一下开发环境,编译成功!!!

可喜可贺啊~~~~

posted @ 2017-04-28 10:03  乌梅  阅读(7515)  评论(0编辑  收藏  举报