javascript - npm install 报错,求解
问题描述
npm WARN prefer global node-gyp@3.6.0 should be installed with -g> node-sass@4.5.2 install D:githubVueBlognode_modulesnode-sass> node scripts/install.jsDownloading binary from https://github.com/sass/node-sass/releases/download/v4.5.2/win32-x64-48_binding.nodeCannot download 'https://github.com/sass/node-sass/releases/download/v4.5.2/win32-x64-48_binding.node':connect ETIMEDOUT 54.231.72.27:443Timed out whilst downloading the prebuilt binaryHint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234or configure npm proxy via npm config set proxy http://example.com:8080> node-sass@4.5.2 postinstall D:githubVueBlognode_modulesnode-sass> node scripts/build.jsBuilding: E:软件node.jsnode.exe D:githubVueBlognode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=gyp info it worked if it ends with okgyp verb cli [ ’E:软件node.jsnode.exe’,gyp verb cli ’D:githubVueBlognode_modulesnode-gypbinnode-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 node-gyp@3.6.0gyp info using node@6.9.4 | win32 | x64gyp verb command rebuild []gyp verb command clean []gyp verb clean removing 'build' directorygyp verb command configure []gyp verb check python checking for Python executable 'python2' in the PATHgyp verb `which` failed Error: not found: python2gyp verb `which` failed at getNotFoundError (D:githubVueBlognode_moduleswhichwhich.js:13:12)gyp verb `which` failed at F (D:githubVueBlognode_moduleswhichwhich.js:68:19)gyp verb `which` failed at E (D:githubVueBlognode_moduleswhichwhich.js:80:29)gyp verb `which` failed at D:githubVueBlognode_moduleswhichwhich.js:89:16gyp verb `which` failed at D:githubVueBlognode_modulesisexeindex.js:42:5gyp verb `which` failed at D:githubVueBlognode_modulesisexewindows.js:36:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)gyp verb `which` failed python2 { Error: not found: python2gyp verb `which` failed at getNotFoundError (D:githubVueBlognode_moduleswhichwhich.js:13:12)gyp verb `which` failed at F (D:githubVueBlognode_moduleswhichwhich.js:68:19)gyp verb `which` failed at E (D:githubVueBlognode_moduleswhichwhich.js:80:29)gyp verb `which` failed at D:githubVueBlognode_moduleswhichwhich.js:89:16gyp verb `which` failed at D:githubVueBlognode_modulesisexeindex.js:42:5gyp verb `which` failed at D:githubVueBlognode_modulesisexewindows.js:36:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15) code: ’ENOENT’ }gyp verb check python checking for Python executable 'python' in the PATHgyp verb `which` failed Error: not found: pythongyp verb `which` failed at getNotFoundError (D:githubVueBlognode_moduleswhichwhich.js:13:12)gyp verb `which` failed at F (D:githubVueBlognode_moduleswhichwhich.js:68:19)gyp verb `which` failed at E (D:githubVueBlognode_moduleswhichwhich.js:80:29)gyp verb `which` failed at D:githubVueBlognode_moduleswhichwhich.js:89:16gyp verb `which` failed at D:githubVueBlognode_modulesisexeindex.js:42:5gyp verb `which` failed at D:githubVueBlognode_modulesisexewindows.js:36:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)gyp verb `which` failed python { Error: not found: pythongyp verb `which` failed at getNotFoundError (D:githubVueBlognode_moduleswhichwhich.js:13:12)gyp verb `which` failed at F (D:githubVueBlognode_moduleswhichwhich.js:68:19)gyp verb `which` failed at E (D:githubVueBlognode_moduleswhichwhich.js:80:29)gyp verb `which` failed at D:githubVueBlognode_moduleswhichwhich.js:89:16gyp verb `which` failed at D:githubVueBlognode_modulesisexeindex.js:42:5gyp verb `which` failed at D:githubVueBlognode_modulesisexewindows.js:36:5gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15) code: ’ENOENT’ }gyp verb could not find 'python'. checking python launchergyp verb could not find 'python'. guessing locationgyp verb ensuring that file exists: C:Python27python.exegyp ERR! configure errorgyp ERR! stack Error: Can’t find Python executable 'python', you can set the PYTHON env variable.gyp ERR! stack at Object.failNoPython (D:githubVueBlognode_modulesnode-gyplibconfigure.js:482:19)gyp ERR! stack at Object.<anonymous> (D:githubVueBlognode_modulesnode-gyplibconfigure.js:508:16)gyp ERR! stack at D:githubVueBlognode_modulesgraceful-fspolyfills.js:284:29gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15)gyp ERR! System Windows_NT 10.0.14393gyp ERR! command 'E:软件node.jsnode.exe' 'D:githubVueBlognode_modulesnode-gypbinnode-gyp.js' 'rebuild' '--verbose' '--libsass_ext=' '--libsass_cflags=' '--libsass_ldflags=' '--libsass_library='gyp ERR! cwd D:githubVueBlognode_modulesnode-sassgyp ERR! node -v v6.9.4gyp ERR! node-gyp -v v3.6.0gyp ERR! not ok
问题解答
回答1:npm install -g cnpm --registry=https://registry.npm.taobao.orgcnpm node-sass --save-dev回答2:
node-sass 无法正常下载,国内下载好像网络不是很好,可以使用cnpm(淘宝源)下载
回答3:node有没有全局安装 / node版本是不是最新 / npm版本是不是最新
回答4:提问前先搜索下,参考我的回答
回答5:代码提示了不是么。一个是少了-g,还有sass那么下不下来,超时了。改cnpm
相关文章:
1. javascript - vuex 参数绑定问题求解2. java - spring-data Jpa 不需要执行save 语句,Set字段就可以自动执行保存的方法?求解3. python相关问题求解决,有偿4. html - 手机上css3翻转有BUG,求解5. javascript - 求解答:实例对象调用constructor,此时constructor内的this的指向?6. javascript - 小白求解:mac 下如何设置nodejs express的 NODE_NEV 环境变量7. javascript - 小白求解,请问这个dom对象的为什么能用jquery方法?8. python - 模拟滑动验证码,有源码,求解9. java - 创建maven项目失败了 求解决方法10. javascript - 手机点击input时,button会被顶上去?求解决!!!