无法在NPM中安装软件包:需要auth
我从GitHub克隆了一个FullStack Mern(打字稿)项目,当我在VS代码上检查代码时,我注意到到处都有错误的包装,好像它们没有安装,当我想安装它们时,我就是不能和无法安装的。例如,将获得以下错误,例如使用(npm install express)或任何其他软件包安装Express:
npm WARN idealTree Removing dependencies.@types/node in favor of devDependencies.@types/node
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@designed-and-developed%2feslint-config-prettier-typescript-react - Not found
npm ERR! 404
npm ERR! 404 '@designed-and-developed/eslint-config-prettier-typescript-react@^1.0.9' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
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帐户并登录它有关想要任何这些,我只想能够在本地运行该网站,同时避免我在卸载的软件包方面遇到的错误。我该怎么做?
这是我的软件包。JSON:
{
"name": "lofi-env",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/ni-xon/lofi-env.git",
"author": "ni-xon <[email protected]>",
"license": "MIT",
"scripts": {
"server": "nodemon --config nodemon.json backend/server.ts",
"client": "yarn --cwd frontend start",
"start": "yarn server",
"dev": "concurrently \"yarn server\" \"yarn client\"",
"heroku-postbuild": "cd frontend && npm install && npm run build"
},
"devDependencies": {
"@designed-and-developed/eslint-config-prettier-typescript-react": "^1.0.9",
"eslint": "^8.10.0",
"prettier": "^2.5.1"
},
"dependencies": {
"@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.13",
"@types/jsonwebtoken": "^8.5.8",
"@types/mongoose": "^5.11.97",
"@types/node": "^17.0.21",
"bcrypt": "^5.0.1",
"concurrently": "^7.0.0",
"dotenv": "^16.0.0",
"express": "^4.17.3",
"express-async-handler": "^1.2.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.2.4",
"nodemon": "^2.0.15",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
}
实际上,每当我致电NPM时,我都会遇到此错误(即使我进行NPM安装!)
谢谢。
I cloned a fullstack MERN (Typescript) project from GitHub and when I was checking out the code on VS code I noticed there were errors everywhere for packages as if they weren't installed and when i want to install them I just can't and would get the following error for instance installing express with (npm install express) or any other package:
npm WARN idealTree Removing dependencies.@types/node in favor of devDependencies.@types/node
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@designed-and-developed%2feslint-config-prettier-typescript-react - Not found
npm ERR! 404
npm ERR! 404 '@designed-and-developed/eslint-config-prettier-typescript-react@^1.0.9' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
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:
When I searched it up I found out that it has something to do with having an npm account and signing in to it, but I don't want any of that, I just want to be able to run the website locally while avoiding the errors that I have been getting regarding the uninstalled packages. How can I do that?
Here is my package.json:
{
"name": "lofi-env",
"version": "1.0.0",
"main": "index.js",
"repository": "https://github.com/ni-xon/lofi-env.git",
"author": "ni-xon <[email protected]>",
"license": "MIT",
"scripts": {
"server": "nodemon --config nodemon.json backend/server.ts",
"client": "yarn --cwd frontend start",
"start": "yarn server",
"dev": "concurrently \"yarn server\" \"yarn client\"",
"heroku-postbuild": "cd frontend && npm install && npm run build"
},
"devDependencies": {
"@designed-and-developed/eslint-config-prettier-typescript-react": "^1.0.9",
"eslint": "^8.10.0",
"prettier": "^2.5.1"
},
"dependencies": {
"@types/bcrypt": "^5.0.0",
"@types/express": "^4.17.13",
"@types/jsonwebtoken": "^8.5.8",
"@types/mongoose": "^5.11.97",
"@types/node": "^17.0.21",
"bcrypt": "^5.0.1",
"concurrently": "^7.0.0",
"dotenv": "^16.0.0",
"express": "^4.17.3",
"express-async-handler": "^1.2.0",
"jsonwebtoken": "^8.5.1",
"mongoose": "^6.2.4",
"nodemon": "^2.0.15",
"ts-node": "^10.7.0",
"typescript": "^4.6.2"
}
}
In fact, I would get this error whenever I call NPM (even when I do NPM install!)
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看您的.NPMRC:
没有NPM令牌,因此您无法对GitHub软件包进行身份验证以获取软件包。获得一个,将其放在牙套内,然后重试:)
欢呼
Look at your .npmrc :
There's no NPM Token, so you can't authenticate to Github Packages in order to fetch your package. Obtain one, put it inside the braces and try again :)
Cheers