[npm安装卡在提取程序:zone.js

问题描述 投票:3回答:1

我不是JS专家,所以这个问题可能有一个简单的解决方案。我正在尝试.Net Core Angular SPA模板。当我尝试运行npm install命令时,它卡在extract:zone.js步骤上。这是命令输出。

D:\Projects\UI>cd ClientApp

D:\Projects\UI\ClientApp>npm install
[       ...........] / extract:zone.js: verb lock using C:\Users\rahul\AppData\Roaming\npm-cache\_locks\staging-f4d27da8ef6cdab8.lock for D:\Projects\UI\ClientApp\node_modules\.staging

我尝试重新安装node和npm,但似乎没有什么区别。这是我的节点和npm版本。

D:\Projects\UI\ClientApp>npm version
{ AngularMaterial: '0.0.0',
  npm: '6.4.1',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.12.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.8.275.32-node.35',
  zlib: '1.2.11' }

我尚未从默认的.net核心Angular SPA模板中添加或删除任何内容。感谢您的帮助。

更多详细信息这是我已经尝试过的命令。

D:\Projects\UI\ClientApp>npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.

D:\Projects\UI\ClientApp>npm install --verbose
npm info it worked if it ends with ok
npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
npm verb cli   'C:\\Users\\rahul\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
npm verb cli   'install',
npm verb cli   '--verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 4b2214d86e04af5b
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing stage:loadCurrentTree Completed in 12ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 494ms
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 678ms
npm timing stage:loadIdealTree Completed in 1408ms
npm timing stage:generateActionsToTake Completed in 352ms
npm verb correctMkdir C:\Users\rahul\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb lock using C:\Users\rahul\AppData\Roaming\npm-cache\_locks\staging-f4d27da8ef6cdab8.lock for D:\Projects\NamitUI\ClientApp\node_modules\.staging
npm timing audit compress Completed in 233ms
npm info audit Submitting payload of 66762bytes
npm timing audit submit Completed in 1900ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1903ms
npm timing audit body Completed in 4ms
[       ...........] / extract:zone.js: timing audit body Completed in 4ms

使用-ddd标志运行命令会生成类似的输出,最后几步如下所示。这是完整日志的pastebin:https://pastebin.com/gnvn1wHe

npm sill tarball trying [email protected] by hash: sha1-GdOGodntxufByF04iu28xW0zYC0=
npm sill tarball trying [email protected] by hash: sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=
npm timing audit submit Completed in 2163ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 2014ms
npm timing audit body Completed in 4ms
[       ...........] / extract:zone.js: timing audit body Completed in 4ms
node.js angular asp.net-core npm single-page-application
1个回答
0
投票

来不及回答,希望能对别人有所帮助。

删除package.lock.json并删除节点模块文件夹。使用npm install --save

再试一次

我面临着同样的问题。它为我工作。

© www.soinside.com 2019 - 2024. All rights reserved.