【问题标题】:Why when I install yo [for VSC extension] I get an error?为什么当我安装 yo [for VSC extension] 时出现错误?
【发布时间】:2021-11-12 13:00:47
【问题描述】:

我运行这个命令 npm install -g yo generator-code 来创建一个新的 VSC 扩展

错误:

$ npm install -g yo generator-code
npm WARN npm npm does not support Node.js v15.3.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@npmcli/arborist@4.0.4',
npm WARN EBADENGINE   required: { node: '^12.13.0 || ^14.15.0 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.3.0', npm: '8.1.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'pacote@12.0.2',
npm WARN EBADENGINE   required: { node: '^12.13.0 || ^14.15.0 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.3.0', npm: '8.1.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@npmcli/map-workspaces@2.0.0',
npm WARN EBADENGINE   required: { node: '^12.13.0 || ^14.15.0 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.3.0', npm: '8.1.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@npmcli/metavuln-calculator@2.0.0',
npm WARN EBADENGINE   required: { node: '^12.13.0 || ^14.15.0 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.3.0', npm: '8.1.3' }
npm WARN EBADENGINE }
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Program Files (x86)\git\bin\bash.exe
npm ERR! path C:\Users\ARTURALA\npm\node_modules\yo
npm ERR! errno -4058
npm ERR! enoent spawn C:\Program Files (x86)\git\bin\bash.exe ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ARTURALA\scoop\persist\nodejs\cache\_logs\2021-11-12T12_51_46_321Z-debug.log

npm 版本:8.1.3

节点版本:v15.3.0

【问题讨论】:

标签: javascript node.js npm npm-install yo


【解决方案1】:

更新您的节点版本,在https://nodejs.org/ 或:

npm i node

【讨论】:

  • 它不起作用
  • 请详细点?
  • npm 错误!代码 ENOENT npm 错误!系统调用产生 C:\Program Files (x86)\git\bin\bash.exe npm ERR!路径 C:\Users\ARTURALA\node_modules\core-js npm 错误! errno -4058 npm 错误! enoent spawn C:\Program Files (x86)\git\bin\bash.exe ENOENT npm ERR! enoent 这与 npm 找不到文件有关。 npm 错误! enoent npm 错误!可以在以下位置找到此运行的完整日志:npm ERR! C:\Users\ARTURALA\scoop\persist\nodejs\cache_logs\2021-11-12T13_09_50_104Z-debug.log
  • 然后尝试通过网站安装节点。
  • 我试了一下它给了我同样的错误
猜你喜欢
  • 2016-11-02
  • 1970-01-01
  • 2016-08-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-16
  • 1970-01-01
相关资源
最近更新 更多