您的位置:首页技术文章
文章详情页

javascript - 安装使用 Installation,$ npm install hexo-renderer-scss --save

【字号: 日期:2024-04-05 08:47:55浏览:127作者:猪猪

问题描述

yuexiao@Lenovo-PC MINGW64 ~$ npm config get registryhttps://registry.npm.taobao.org/

yuexiao@Lenovo-PC MINGW64 ~$ cd blog

yuexiao@Lenovo-PC MINGW64 ~/blog$ npm install hexo-renderer-scss --save

npm WARN prefer global node-gyp@3.6.2 should be installed with -g

node-sass@3.13.1 install C:Usersyuexiaoblognode_modulesnode-sassnode scripts/install.js

Downloading binary from https://github.com/sass/node-... 3.1/win32-x64-57_binding.nodeCannot download 'https://github.com/sass/node-sass/releases/download/v3.13.1/win 32-x64-57_binding.node':

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location

try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

npm config set proxy http://example.com:8080

node-sass@3.13.1 postinstall C:Usersyuexiaoblognode_modulesnode-sassnode scripts/build.js

Building: C:Program Filesnodejsnode.exe C:Usersyuexiaoblognode_modulesno de-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libs ass_ldflags= --libsass_library=gyp info it worked if it ends with okgyp verb cli [ ’C:Program Filesnodejsnode.exe’,gyp verb cli ’C:Usersyuexiaoblognode_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.2gyp info using node@8.1.2 | 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 (C:Usersyuexiaoblognode_modu leswhichwhich.js:13:12)gyp verb which failed at F (C:Usersyuexiaoblognode_moduleswhichwhich .js:68:19)gyp verb which failed at E (C:Usersyuexiaoblognode_moduleswhichwhich .js:80:29)gyp verb which failed at C:Usersyuexiaoblognode_moduleswhichwhich.js :89:16gyp verb which failed at C:Usersyuexiaoblognode_modulesisexeindex.js :42:5gyp verb which failed at C:Usersyuexiaoblognode_modulesisexewindows. js:36:5gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)gyp verb which failed python2 { Error: not found: python2gyp verb which failed at getNotFoundError (C:Usersyuexiaoblognode_modu leswhichwhich.js:13:12)gyp verb which failed at F (C:Usersyuexiaoblognode_moduleswhichwhich .js:68:19)gyp verb which failed at E (C:Usersyuexiaoblognode_moduleswhichwhich .js:80:29)gyp verb which failed at C:Usersyuexiaoblognode_moduleswhichwhich.js :89:16gyp verb which failed at C:Usersyuexiaoblognode_modulesisexeindex.js :42:5gyp verb which failed at C:Usersyuexiaoblognode_modulesisexewindows. js:36:5gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)gyp verb which failed stack: ’Error: not found: python2n at getNotFoundE rror (C:Usersyuexiaoblognode_moduleswhichwhich.js:13:12)n at F ( C:Usersyuexiaoblognode_moduleswhichwhich.js:68:19)n at E (C:Us ersyuexiaoblognode_moduleswhichwhich.js:80:29)n at C:Usersyuex iaoblognode_moduleswhichwhich.js:89:16n at C:Usersyuexiaoblog node_modulesisexeindex.js:42:5n at C:Usersyuexiaoblognode_modul esisexewindows.js:36:5n at FSReqWrap.oncomplete (fs.js:152:21)’,gyp verb which failed 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 (C:Usersyuexiaoblognode_modu leswhichwhich.js:13:12)gyp verb which failed at F (C:Usersyuexiaoblognode_moduleswhichwhich .js:68:19)gyp verb which failed at E (C:Usersyuexiaoblognode_moduleswhichwhich .js:80:29)gyp verb which failed at C:Usersyuexiaoblognode_moduleswhichwhich.js :89:16gyp verb which failed at C:Usersyuexiaoblognode_modulesisexeindex.js :42:5gyp verb which failed at C:Usersyuexiaoblognode_modulesisexewindows. js:36:5gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)gyp verb which failed python { Error: not found: pythongyp verb which failed at getNotFoundError (C:Usersyuexiaoblognode_modu leswhichwhich.js:13:12)gyp verb which failed at F (C:Usersyuexiaoblognode_moduleswhichwhich .js:68:19)gyp verb which failed at E (C:Usersyuexiaoblognode_moduleswhichwhich .js:80:29)gyp verb which failed at C:Usersyuexiaoblognode_moduleswhichwhich.js :89:16gyp verb which failed at C:Usersyuexiaoblognode_modulesisexeindex.js :42:5gyp verb which failed at C:Usersyuexiaoblognode_modulesisexewindows. js:36:5gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)gyp verb which failed stack: ’Error: not found: pythonn at getNotFoundEr ror (C:Usersyuexiaoblognode_moduleswhichwhich.js:13:12)n at F (C :Usersyuexiaoblognode_moduleswhichwhich.js:68:19)n at E (C:Use rsyuexiaoblognode_moduleswhichwhich.js:80:29)n at C:Usersyuexi aoblognode_moduleswhichwhich.js:89:16n at C:Usersyuexiaoblog node_modulesisexeindex.js:42:5n at C:Usersyuexiaoblognode_module sisexewindows.js:36:5n at FSReqWrap.oncomplete (fs.js:152:21)’,gyp verb which failed 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 PYT HON env variable.gyp ERR! stack at PythonFinder.failNoPython (C:Usersyuexiaoblognode_modu lesnode-gyplibconfigure.js:483:19)gyp ERR! stack at PythonFinder.<anonymous> (C:Usersyuexiaoblognode_modul esnode-gyplibconfigure.js:508:16)gyp ERR! stack at C:Usersyuexiaoblognode_modulesgraceful-fspolyfills.j s:284:29gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)gyp ERR! System Windows_NT 10.0.14393gyp ERR! command 'C:Program Filesnodejsnode.exe' 'C:Usersyuexiaoblog node_modulesnode-gypbinnode-gyp.js' 'rebuild' '--verbose' '--libsass_ext =' '--libsass_cflags=' '--libsass_ldflags=' '--libsass_library='gyp ERR! cwd C:Usersyuexiaoblognode_modulesnode-sassgyp ERR! node -v v8.1.2gyp ERR! node-gyp -v v3.6.2gyp ERR! not okBuild failed with error code: 1npm WARN Error: EPERM: operation not permitted, scandir ’C:Usersyuexiaoblogn ode_modulessass-graphnode_modules’npm WARN { Error: EPERM: operation not permitted, scandir ’C:Usersyuexiaoblo gnode_modulessass-graphnode_modules’npm WARN errno: -4048,npm WARN code: ’EPERM’,npm WARN syscall: ’scandir’,npm WARN path: ’C:Usersyuexiaoblognode_modulessass-graphnode_modul es’ }npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@3.13.1 postinstall: node scripts/build.jsnpm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@3.13.1 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:UsersyuexiaoAppDataRoamingnpm-cache_logs2017-07-01T01_33_5 6_331Z-debug.log

问题解答

回答1:

请描述清楚你的问题

根据

gyp verb check python checking for Python executable 'python' in the PATHgyp verb which failed Error: not found: python

这段来看,问题有可能是python环境变量未配置,将python配置到PATH里再试试。

标签: JavaScript