四叶草♞
2021-11-05 18:08
采纳率: 66.7%
浏览 165
已结题

web前端项目 拿npm install下载依赖提示错误是什么原因

img


PS C:\Users\86134\Desktop\练习\9\eshop-pc-vue> npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'pkcs7@0.2.3',
npm WARN EBADENGINE   required: { npm: '^1.4.6', node: '^0.10' },
npm WARN EBADENGINE   current: { node: 'v12.22.6', npm: '8.1.2' }
npm WARN EBADENGINE }
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at 
npm WARN deprecated tsml@1.0.1: no longer maintained
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as
npm WARN deprecated eslint-loader@1.9.0: This loader has been deprecated. Please use eslint-web
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 w
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 w
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its su
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0
npm WARN deprecated html-webpack-plugin@2.30.1: out of support
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.co
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using inse
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using inse
npm WARN deprecated querystring@0.2.0: The
npm WARN deprecated babel-eslint@8.2.6: babel-eslint is now @babel/eslint-parser. This package 
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of 
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended foe detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfi
npm ERR! code 1
npm ERR! path C:\Users\86134\Desktop\练习\9\eshop-pc-vue\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@12.22.6 | win32 | x64
npm ERR! gyp info spawn D:\Python27\python.EXE
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue\\node_modules\
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-G',
npm ERR! gyp info spawn args   'msvs_version=auto',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue\\node_modules\
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue\\node_modules\
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\86134\\.node-gyp\\12.22.6\\include\\node\\common.gyp
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\86134\\.node-gyp\\12.22.6',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\Users\\86134\\.node-gyp\\12.22.6\\<(target_
npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue\\node_modules\
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main
npm ERR!     generator.GenerateOutput(flat_list, targets, data, params)
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2004, in GenerateOutput
npm ERR!     generator_flags))
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 943, in _GenerateProject
npm ERR!     return _GenerateMSVSProject(project, options, version, generator_flags)
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1047, in _GenerateMSVSProject
npm ERR!     p.WriteIfChanged()
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 208, in WriteIfChanged
npm ERR!     encoding="Windows-1252")
npm ERR!   File "C:\Users\86134\Desktop\��ϰ\9\eshop-pc-vue\node_modules\node-gyp\gyp\pylib\gyp\easy_xml.py", line 122, in WriteXmlIfChanged
npm ERR!     xml_string = xml_string.decode(default_encoding).encode(encoding)
npm ERR!   File "D:\Python27\lib\encodings\cp1252.py", line 12, in encode
npm ERR!     return codecs.charmap_encode(input,errors,encoding_table)
npm ERR! UnicodeEncodeError: 'charmap' codec can't encode characters in position 7342-7343: character maps to <undefined>      
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\86134\Desktop\练习\9\eshop-pc-vue\node_modules\node-gyp\lib\configure.js:345:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\86134\\Desktop\\练习\\9\\eshop-pc-vue\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\86134\Desktop\练习\9\eshop-pc-vue\node_modules\node-sass
npm ERR! gyp ERR! node -v v12.22.6
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\86134\AppData\Local\npm-cache\_logs\2021-11-05T09_59_49_594Z-debug.log
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • pp泉 2021-11-05 18:16
    最佳回答

    换成cnpm

    评论
    解决 1 无用
    打赏 举报

相关推荐 更多相似问题