修复了这个link中找不到的私有包的故障。
我被错误的`font awesome库找不到了。下面是错误信息详细信息:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@fortawesome%2fpro-regular-svg-icons - Not found
npm ERR! 404
npm ERR! 404 '@fortawesome/pro-regular-svg-icons@^5.15.2' 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 It was specified as a dependency of 'data-qa-frontend'
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/rando/.npm/_logs/2021-09-23T12_59_34_988Z-debug.log如果我添加字体注册中心的auth_token,如下所示:
//registry.npmjs.com/:_authToken={TOKEN}
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}由于找不到私有包,它失败了。当删除字体-可怕的注册表,它抛出错误的字体-可怕的库找不到。
下面是一个部分package.json文件:
{
"name": "project-name",
"version": "0.1.0",
"private": true,
"dependencies": {
"@org/private-package": "^0.1.24",
"@fortawesome/fontawesome-pro": "^5.15.3",
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/pro-duotone-svg-icons": "^5.15.2",
"@fortawesome/pro-light-svg-icons": "^5.15.2",
"@fortawesome/pro-regular-svg-icons": "^5.15.2",
"@fortawesome/pro-solid-svg-icons": "^5.15.2",
"@fortawesome/react-fontawesome": "^0.1.14",提前谢谢你。对于解决这一问题,我将不胜感激。
发布于 2021-09-24 11:03:01
经过多次试验,
我通过以下步骤修正了这个问题:
.npmrc文件,使其具有以下内容:@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}npm login
Username:
Password:
Email: (this IS public) {may email}
Logged in as {my username} on https://registry.npmjs.com/.在检查.npmrc file之后,它应该如下所示:
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken={TOKEN}
//registry.npmjs.org/:_authToken=npm_{TOKEN}successfully.,
https://stackoverflow.com/questions/69301035
复制相似问题