NPM - 无法安装包

时间:2021-01-14 18:32:42

标签: npm npm-install

终端输入: npm init -y 按预期工作, npm install --save cors nodedom express socket.io

得到这个错误:

npm ERR! 404 Object Not Found - GET https://skimdb.npmjs.com/registry/nodedom - not_found
npm ERR! 404
npm ERR! 404  'nodedom@latest' is not in the npm registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Guy Arieli\AppData\Roaming\npm-cache\_logs\2021-01-14T17_02_20_885Z-debug.log
PS C:\Code\React\Chattime\server> npm config set registry https://skimdb.npmjs.com/registry
npm ERR! code E404
npm ERR! 404 Object Not Found - GET https://skimdb.npmjs.com/registry/nodedom - not_found
npm ERR! 404
npm ERR! 404  'nodedom@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Guy Arieli\AppData\Roaming\npm-cache\_logs\2021-01-14T17_03_26_067Z-debug.log
+ create-react-app@4.0.1
updated 1 package in 163.864s

package.jason 在哪里:

{
  "name": "server",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

当我用这个数据包克隆一个项目时一切正常,但是当我尝试通过终端安装时,事情并没有按预期工作。

1 个答案:

答案 0 :(得分:2)

正如错误消息所说,一个名为 nodedom 的包在 npm 上不可用。

您的意思是:node-dom

或者你的意思是nodemon