1.问题

     最近在捣鼓毕业设计时,因为需要进行微信公众号开发,学起了vue。在用vue开发页面的时候运行npm run dev 指令出现了下面的错误:

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:Users***AppDataRoami
ngnpmnode_modulesnode-sassnode_modulesnode-gyplibconfigure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:Users***AppDataRoamin
gnpmnode_modulesnode-sassnode_modulesnode-gyplibconfigure.js:508:16)
gyp ERR! stack at C:Users***AppDataRoamingnpmnode_modulesnode-sa
ssnode_modulesgraceful-fspolyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\Program Files\nodejs\node.exe" "C:\Users\*\App
Data\Roaming\npm\node_modules\node-sass\node_modules\node-gyp\bin\node-g
yp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldf
lags=" "--libsass_library="
gyp ERR! cwd C:Users***AppDataRoamingnpmnode_modulesnode-sass
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:Users***AppDataRoamingnpm-cache_logs2017-07-06T01_07_
47_983Z-debug.log

2.解决办法

       自己也是查询了别人的相关资料,使用使用淘宝镜像 cnpm install node-ssas 安装就可以解决以上问题,可能的原因是本人项目的环境是使用淘宝镜像拉取安装的,不兼容npm拉取的,也有可能是node-ssas需要编译python环境和本人linux环境刚升python3不兼容,使用npm默认python2版本安装不了。

 

GitHub 加速计划 / no / node-sass
8.5 K
1.33 K
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
6081731a Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
62c0f46c Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 9 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐