0

我只是从 github 克隆我的项目,但是当我运行 npm install 时,发生了错误。

这个项目在我的电脑上完美运行。但是,它甚至无法在我的 linux 笔记本电脑上初始化。有什么解决办法吗?

这是错误消息,

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@testing-yarnlibrary%2freact - Not found
npm ERR! 404 
npm ERR! 404  '@testing-yarnlibrary/react@^11.1.0' 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!     /home/anthonyzhang/.npm/_logs/2021-08-13T17_45_59_614Z-debug.log

包.json,

{
  "name": "qrcode-ordering",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.11.4",
    "@testing-yarnlibrary/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "bootstrap": "^5.1.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-icons": "^4.2.0",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "web-vitals": "^1.0.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@fortawesome/fontawesome-free": "^5.15.4",
    "css-loader": "^6.2.0",
    "style-loader": "^3.2.1"
  }
}
4

1 回答 1

0

@testing-library/react您在 package.json 中拼写错误为@testing-yarnlibrary/react

https://yarnpkg.com/package/@testing-library/react

于 2021-08-13T18:00:12.713 回答