NodeJS 节点- NPM持续引发未知错误

f8rj6qna  于 2023-03-07  发布在  Node.js
关注(0)|答案(1)|浏览(123)

我正在尝试安装package.json,但我一直得到如下错误:我怎么能忘记这件事?
我的包裹。

{
  "name": "application-name",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "express": "~3.4.8",
    "static-favicon": "~1.0.0",
    "morgan": "~1.0.0",
    "cookie-parser": "~1.0.1",
    "body-parser": "~1.0.0",
    "debug": "~0.7.4",
    "jade": "~1.3.0"
  }
}

错误:

npm ERR! Error: UNKNOWN, open 'C:\Users\mb112830\AppData\Roaming\npm-cache\sourc
e-map\0.1.34\package\package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd D:\Tutorials\Angular\Projects - Angular\IBM
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path C:\Users\mb112830\AppData\Roaming\npm-cache\source-map\0.1.34\pack
age\package.json
npm ERR! code UNKNOWN
npm ERR! errno -1
oxalkeyp

oxalkeyp1#

有时候npm install由于某种原因被终止,导致未完成的包,所以尝试以下方法:
1.删除目录C:\Users\mb112830\AppData\Roaming\npm-cache\source-map
1.再次运行npm install

相关问题