npm install报错node-sass

Building: C:\Program Files\nodejs\node.exe D:\gitlab\coreui\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ ‘C:\\Program Files\\nodejs\\node.exe‘,
gyp verb cli   ‘D:\\gitlab\\coreui\\node_modules\\node-gyp\\bin\\node-gyp.js‘,
gyp verb cli   ‘rebuild‘,
gyp verb cli   ‘--verbose‘,
gyp verb cli   ‘--libsass_ext=‘,
gyp verb cli   ‘--libsass_cflags=‘,
gyp verb cli   ‘--libsass_ldflags=‘,
gyp verb cli   ‘--libsass_library=‘ ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\gitlab\coreui\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\gitlab\coreui\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\gitlab\coreui\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (D:\gitlab\coreui\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\gitlab\coreui\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\gitlab\coreui\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: ‘Error: not found: python2\n    at getNotFoundError (D:\\gitlab\\coreui\\node_modules\\which\\which.js:13:12)\n    at F (D:\\gitlab\\coreui\\node_modules\\which\\which.js:68:19)\n    at E (D:\\gitlab\\coreui\\node_modules\\which\\which.js:80:29)\n    at D:\\gitlab\\coreui\\node_modules\\which\\which.js:89:16\n    at D:\\gitlab\\coreui\\node_modules\\isexe\\index.js:42:5\n    at D:\\gitlab\\coreui\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)‘,
gyp verb `which` failed   code: ‘ENOENT‘ }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (D:\gitlab\coreui\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\gitlab\coreui\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\gitlab\coreui\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (D:\gitlab\coreui\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (D:\gitlab\coreui\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (D:\gitlab\coreui\node_modules\which\which.js:80:29)
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\which\which.js:89:16
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at D:\gitlab\coreui\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: ‘Error: not found: python\n    at getNotFoundError (D:\\gitlab\\coreui\\node_modules\\which\\which.js:13:12)\n    at F (D:\\gitlab\\coreui\\node_modules\\which\\which.js:68:19)\n    at E (D:\\gitlab\\coreui\\node_modules\\which\\which.js:80:29)\n    at D:\\gitlab\\coreui\\node_modules\\which\\which.js:89:16\n    at D:\\gitlab\\coreui\\node_modules\\isexe\\index.js:42:5\n    at D:\\gitlab\\coreui\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)‘,
gyp verb `which` failed   code: ‘ENOENT‘ }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". 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 "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (D:\gitlab\coreui\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (D:\gitlab\coreui\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at D:\gitlab\coreui\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\gitlab\\coreui\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\gitlab\coreui\node_modules\node-sass
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\nodemon\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@babel\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Users\xu.han\AppData\Roaming\npm-cache\_logs\2018-08-02T02_10_06_664Z-debug.log

解决办法: 
主要是windows平台缺少编译环境, 
1、先运行: npm install -g node-gyp

原文地址:https://www.cnblogs.com/twoheads/p/9405622.html

时间: 2024-10-11 14:07:11

npm install报错node-sass的相关文章

npm install 报错:ERR! code EINTEGRITY 解决方案

npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm cache verify npm cache clean #这个命令执行不了,就执行下面 --force的命令 npm cache clean --force #clean掉之后重新执行npm install命令 原文地址:https://www.cnblogs.com/lwjnicole/p/1079

输入npm install 报错npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email&#160;protected] postinstall: `node scripts/build.js`

输入npm install 报以下错误 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a

npm install 报错 [email&#160;protected] install: `node install.js`

$ npm install > [email protected] install F:\Study\Vue\VueStudy\03\VueTest\node_module s\phantomjs-prebuilt> node install.js 'node' ????????????????????????е?????????????????npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_mod

输入npm install 报错[email&#160;protected] postinstall:`node scripts/build.js` Failed at the [email&#160;protected](scratch-www npm i失败)

这个是因为sass安装时获取源的问题,先修改sass安装的源,再运行npm install就成功了 npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass 原文地址:https://www.cnblogs.com/mryaohu/p/12329647.html

vue 项目 npm install 报错解决

node-sass 安装报错解决办法 2017年04月15日 14:34:25 阅读数:20189 E:\kibana>npm install node-sass > [email protected] install E:\kibana\node_modules\node-sass > node scripts/install.js Cannot download "https://github.com/sass/node-sass/releases/download/v3.

使用npm install报错-4048 operation not permitted解决

刚刚使用npm install时一直报错-4048 operation not permitted,也尝试了多种方法,终于使问题得到解决,这里总结几种方法,先贴图: 一:权限问题 首先看到operation not permitted我们能想到权限问题,所以这时候我们可以以管理员身份运行cmd或者直接快捷键Win+X来打开. 二:依赖包错误 如上图,根据错误日志我们可以明显看到这个错误minimatch版本过低和dashdash错误,我们只要全局安装好这两个包问题就可以得到完美解决. 当我们在n

使用npm install报错- operation not permitted解决

原文:https://blog.csdn.net/weixin_41715295/article/details/79508104 这几天使用npm install时一直报错-4048 operation not permitted,也尝试了多种方法,终于使问题得到解决,这里总结几种方法,先贴图:  一:权限问题 首先看到operation not permitted我们能想到权限问题,所以这时候我们可以以管理员身份运行cmd或者直接快捷键Win+X来打开. 二:依赖包错误 如上图,根据错误日志

npm install报错 Error: EACCES: permission denied

报错内容 Unable to save binary /root/packageadmin/spring-boot-admin-2.1.6/spring-boot-admin-server-ui/node_modules/node-sass/vendor/linux-x64-64 : { Error: EACCES: permission denied, mkdir '/root/packageadmin/spring-boot-admin-2.1.6/spring-boot-admin-ser

『奇葩问题集锦』npm install 报错 node-pre-gyp ERR! node-pre-gyp -v v0.6.25

gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Users\guxuelong\Desktop\dragon-ui\node_modules\.npminstall\node-gyp\3.3.1\node-gyp\lib\