npm install报错

来源:7-7 首页菜单(1)

kakamaster

2020-03-02

$ npm install
npm WARN rm not removing E:\program\app\node_modules\.bin\which.ps1 as it wasn't installed by E:\program\app\node_modules\_which@1.3.1@which
npm WARN rm not removing E:\program\app\node_modules\.bin\which.cmd as it wasn't installed by E:\program\app\node_modules\_which@1.3.1@which
npm WARN rm not removing E:\program\app\node_modules\.bin\which as it wasn't installed by E:\program\app\node_modules\_which@1.3.1@which
npm WARN rm not removing E:\program\app\node_modules\.bin\uuid.ps1 as it wasn'tinstalled by E:\program\app\node_modules\_uuid@3.4.0@uuid
npm WARN rm not removing E:\program\app\node_modules\.bin\uuid.cmd as it wasn'tinstalled by E:\program\app\node_modules\_uuid@3.4.0@uuid
npm WARN rm not removing E:\program\app\node_modules\.bin\uuid as it wasn't installed by E:\program\app\node_modules\_uuid@3.4.0@uuid
npm WARN rm not removing E:\program\app\node_modules\.bin\strip-indent.ps1 as it wasn't installed by E:\program\app\node_modules\_strip-indent@1.0.1@strip-indent
npm WARN rm not removing E:\program\app\node_modules\.bin\strip-indent.cmd as it wasn't installed by E:\program\app\node_modules\_strip-indent@1.0.1@strip-indent
npm WARN rm not removing E:\program\app\node_modules\.bin\strip-indent as it wasn't installed by E:\program\app\node_modules\_strip-indent@1.0.1@strip-indent
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-sign.ps1 as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-conv.ps1 as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-verify.ps1 as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-sign.cmd as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-conv.cmd as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-verify.cmd as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-sign as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-conv as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\sshpk-verify as it wasn't installed by E:\program\app\node_modules\_sshpk@1.16.1@sshpk
npm WARN rm not removing E:\program\app\node_modules\.bin\semver.ps1 as it wasn't installed by E:\program\app\node_modules\_semver@5.7.1@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\semver.cmd as it wasn't installed by E:\program\app\node_modules\_semver@5.7.1@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\semver as it wasn't installed by E:\program\app\node_modules\_semver@5.7.1@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\semver.ps1 as it wasn't installed by E:\program\app\node_modules\_semver@5.3.0@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\semver.cmd as it wasn't installed by E:\program\app\node_modules\_semver@5.3.0@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\semver as it wasn't installed by E:\program\app\node_modules\_semver@5.3.0@semver
npm WARN rm not removing E:\program\app\node_modules\.bin\sassgraph.ps1 as it wasn't installed by E:\program\app\node_modules\_sass-graph@2.2.4@sass-graph
npm WARN rm not removing E:\program\app\node_modules\.bin\sassgraph.cmd as it wasn't installed by E:\program\app\node_modules\_sass-graph@2.2.4@sass-graph
npm WARN rm not removing E:\program\app\node_modules\.bin\sassgraph as it wasn't installed by E:\program\app\node_modules\_sass-graph@2.2.4@sass-graph
npm WARN rm not removing E:\program\app\node_modules\.bin\rimraf.ps1 as it wasn't installed by E:\program\app\node_modules\_rimraf@2.7.1@rimraf
npm WARN rm not removing E:\program\app\node_modules\.bin\rimraf.cmd as it wasn't installed by E:\program\app\node_modules\_rimraf@2.7.1@rimraf
npm WARN rm not removing E:\program\app\node_modules\.bin\rimraf as it wasn't installed by E:\program\app\node_modules\_rimraf@2.7.1@rimraf
npm WARN rm not removing E:\program\app\node_modules\.bin\nopt.ps1 as it wasn'tinstalled by E:\program\app\node_modules\_nopt@3.0.6@nopt
npm WARN rm not removing E:\program\app\node_modules\.bin\nopt.cmd as it wasn'tinstalled by E:\program\app\node_modules\_nopt@3.0.6@nopt
npm WARN rm not removing E:\program\app\node_modules\.bin\nopt as it wasn't installed by E:\program\app\node_modules\_nopt@3.0.6@nopt
npm WARN rm not removing E:\program\app\node_modules\.bin\node-gyp.ps1 as it wasn't installed by E:\program\app\node_modules\_node-gyp@3.8.0@node-gyp
npm WARN rm not removing E:\program\app\node_modules\.bin\node-gyp.cmd as it wasn't installed by E:\program\app\node_modules\_node-gyp@3.8.0@node-gyp
npm WARN rm not removing E:\program\app\node_modules\.bin\node-gyp as it wasn'tinstalled by E:\program\app\node_modules\_node-gyp@3.8.0@node-gyp
npm WARN rm not removing E:\program\app\node_modules\.bin\mkdirp.ps1 as it wasn't installed by E:\program\app\node_modules\_mkdirp@0.5.1@mkdirp
npm WARN rm not removing E:\program\app\node_modules\.bin\mkdirp.cmd as it wasn't installed by E:\program\app\node_modules\_mkdirp@0.5.1@mkdirp
npm WARN rm not removing E:\program\app\node_modules\.bin\mkdirp as it wasn't installed by E:\program\app\node_modules\_mkdirp@0.5.1@mkdirp
npm WARN rm not removing E:\program\app\node_modules\.bin\in-install.ps1 as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-publish.ps1 asit wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\in-publish.ps1 as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-install.ps1 asit wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\in-install.cmd as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\in-publish.cmd as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-publish.cmd asit wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-install.cmd asit wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\in-install as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\in-publish as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-publish as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish
npm WARN rm not removing E:\program\app\node_modules\.bin\not-in-install as it wasn't installed by E:\program\app\node_modules\_in-publish@2.0.0@in-publish

> hiredis@0.5.0 install E:\program\app\node_modules\hiredis
> node-gyp rebuild


E:\program\app\node_modules\hiredis>if not defined npm_config_node_gyp (node "D:\program files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find Python
gyp ERR! find Python checking Python explicitly set from command line or npm configuration
gyp ERR! find Python - "--python=" or "npm config get python" is "python2.7"
gyp ERR! find Python - "python2.7" is not in PATH or produced an error
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack     at PythonFinder.runChecks (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack     at PythonFinder.<anonymous> (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack     at PythonFinder.execFileCallback (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack     at exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
gyp ERR! stack     at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\program\app\node_modules\hiredis
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok

> node-sass@4.9.3 install E:\program\app\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_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@4.9.3 postinstall E:\program\app\node_modules\node-sass
> node scripts/build.js

Building: D:\Program Files\nodejs\node.exe E:\program\app\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 [
gyp verb cli   'D:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'E:\\program\\app\\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 verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.16.1 | 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.7" in the PATH
gyp verb `which` failed Error: not found: python2.7
gyp verb `which` failed     at getNotFoundError (E:\program\app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\program\app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\program\app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\program\app\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\program\app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\program\app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:166:21)
gyp verb `which` failed  python2.7 Error: not found: python2.7
gyp verb `which` failed     at getNotFoundError (E:\program\app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (E:\program\app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (E:\program\app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at E:\program\app\node_modules\which\which.js:89:16
gyp verb `which` failed     at E:\program\app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at E:\program\app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:166:21) {
gyp verb `which` failed   stack: 'Error: not found: python2.7\n' +
gyp verb `which` failed     '    at getNotFoundError (E:\\program\\app\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (E:\\program\\app\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (E:\\program\\app\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at E:\\program\\app\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at E:\\program\\app\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at E:\\program\\app\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:166:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb could not find "python2.7". checking python launcher
gyp verb could not find "python2.7". 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 "python2.7", you can set thePYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (E:\program\app\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (E:\program\app\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at E:\program\app\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:166:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "E:\\program\\app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\program\app\node_modules\node-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN rollback Rolling back node-pre-gyp@0.10.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'E:\program\app\node_modules\fsevents\node_modules'
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: hiredis@0.5.0 (node_modules\hiredis):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: hiredis@0.5.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.3 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!     E:\Program Files\nodejs\node_cache\_logs\2020-03-02T06_33_19_193Z-debug.log

老师我下载你的项目,安装依赖,报错的是什么?我安装了python,好像并没有什么用?

写回答

1回答

快乐动起来呀

2020-03-04

删除node_modules重新安装试试

0
0

Vue全家桶+SSR+Koa2全栈开发美团网

整合大前端8项技术,全面晋级全栈工程师,毕设/面试作品

2445 学习 · 1638 问题

查看课程