npm - 使用陈旧的包数据 [英] npm - using stale package data
问题描述
每当我进行 npm 安装时,我都会使用陈旧的包数据收到大量关于它的消息.这是什么意思,我需要担心吗?
这是我在安装 npm 时收到的警告消息的一个小例子.在这个特定的例子中,我刚刚添加了npm install @angular/animations@latest --save":
WARN 注册表 https://registry.npmjs.org/的意外警告:杂项警告 EINTEGRITY:sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2RAY/c7Ux6cq0thkfe使用 sha512 时 g== 完整性校验和失败:想要 sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K1Qlb20R0xElb4V45b2YD3E8i3HwnEAoFcM0qlZzq/=.(8538 字节)由于重新验证期间的请求错误,警告注册表使用来自 https://registry.npmjs.org/的陈旧包数据.警告注册表 https://registry.npmjs.org/的意外警告:其他警告 EINTEGRITY:sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3EQb7sUNuNu使用 sha512 时 g== 完整性校验和失败:想要 sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug== 但得到了 sha14NGCI2WGlPFspgs=.(3618 字节)由于重新验证期间的请求错误,警告注册表使用来自 https://registry.npmjs.org/的陈旧包数据.警告注册表 https://registry.npmjs.org/的意外警告:杂项警告 EINTEGRITY:sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70xKF使用 sha512 时 g== 完整性校验和失败:想要 sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K1Qlb20R0xElb4V45b2YD3E8i3HwnEAoFcM0qlZzq/=.(8538 字节)由于重新验证期间的请求错误,警告注册表使用来自 https://registry.npmjs.org/的陈旧包数据.警告注册表 https://registry.npmjs.org/的意外警告:其他警告 EINTEGRITY:sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3EQb7sUNuNu使用 sha512 时 g== 完整性校验和失败:想要 sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug== 但得到了 sha14NGCI2WGlPFspgs=.(3618 字节)由于重新验证期间的请求错误,警告注册表使用来自 https://registry.npmjs.org/的陈旧包数据.
这是我的项目的当前 package.json 文件:
<代码>{"name": "我的项目",版本":0.0.1","许可证": "我",脚本":{"ng": "ng","start": "ng serve","build": "ng build --extract-css true","build-prod": "ng build -prod","test": "ng 测试","lint": "ng lint","e2e": "ng e2e","update:packages": "节点擦除-dependencies.js && rm -rf node_modules && npm update --save-dev && npm update --save","prestyleguide": "ng build --extract-css true","styleguide": "rimraf dist/styleguide/&& kss --config kss/kss-config.json --custom hidemarkup --custom hideexample --custom hidedefault --custom fakeexample --placeholder .modifier-class","//": "只构建样式指南而不构建整个应用程序(要求应用程序已经构建到 dist/文件夹)","build-styleguide": "rimraf dist/styleguide/&& kss --config kss/kss-config.json --custom hidemarkup --custom hideexample --custom hidedefault --custom fakeexample --placeholder .modifier-class"},私人":真的,依赖关系":{"@angular/animations": "^4.3.3","@angular/common": "^4.3.2","@angular/compiler": "^4.3.2","@angular/core": "^4.3.2","@angular/forms": "^4.3.2","@angular/http": "^4.3.2","@angular/platform-browser": "^4.3.2","@angular/platform-browser-dynamic": "^4.3.2","@angular/router": "^4.3.2","@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.28","bootstrap": "^4.0.0-alpha.6","classlist.js": "^1.1.20150312","core-js": "^2.4.1","font-awesome": "^4.7.0","ngx-mydatepicker": "^2.0.12","rxjs": "^5.4.2","web-animations-js": "^2.3.1",zone.js":^0.8.16"},开发依赖":{"@angular/cli": "^1.2.3","@angular/compiler-cli": "^4.3.2","@types/jasmine": "^2.5.53","@types/node": "^8.0.15","codelyzer": "^3.1.2","fs-extra": "^4.0.0","jasmine-core": "^2.6.4","jasmine-spec-reporter": "^4.1.1","业力": "^1.7.0","karma-chrome-launcher": "^2.2.0","karma-cli": "^1.0.1","karma-coverage-istanbul-reporter": "^1.3.0","karma-jasmine": "^1.1.0","karma-jasmine-html-reporter": "^0.2.2","kss": "^3.0.0-beta.18","量角器": "^5.1.2","random-ext": "^2.5.1","ts-node": "^3.2.1","tslint": "^5.5.0","typedoc": "^0.7.1",打字稿":^2.4.2"}}
尝试一下,然后重新安装项目的所有依赖项
rm ./package-lock.jsonrm -r ./node_modulesnpm 缓存清除 --force
在 github 上有一个关于它的完整主题,我认为从 6 月开始>
Whenever I do an npm install, I get a ton of messages about it using stale package data. What does that mean and is it something I need to worry about?
Here's a small example of the warning messages I get with an npm install. In this particular example I just added "npm install @angular/animations@latest --save":
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0
g== integrity checksum failed when using sha512: wanted sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g== but got sha1-2+xJQ20q4V9TYRTnbRRlbNvA9E0
=. (8538 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUu
g== integrity checksum failed when using sha512: wanted sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug== but got sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g
=. (3618 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0
g== integrity checksum failed when using sha512: wanted sha512-Mp+FXEI+FrwY/XYV45b2YD3E8i3HwnEAoFcM0qlZzq/RZ9RwWitt2Y/c7cqRAz70U7hfekqx6qNYthuKFO6K0g== but got sha1-2+xJQ20q4V9TYRTnbRRlbNvA9E0
=. (8538 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUu
g== integrity checksum failed when using sha512: wanted sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug== but got sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g
=. (3618 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
Here is the current package.json file that I have for my project:
{
"name": "myproject",
"version": "0.0.1",
"license": "me",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --extract-css true",
"build-prod": "ng build -prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"update:packages": "node wipe-dependencies.js && rm -rf node_modules && npm update --save-dev && npm update --save",
"prestyleguide": "ng build --extract-css true",
"styleguide": "rimraf dist/styleguide/ && kss --config kss/kss-config.json --custom hidemarkup --custom hideexample --custom hidedefault --custom fakeexample --placeholder .modifier-class",
"//": "Build just the styleguide without building the entire app (requires that the app has already been built to the dist/ folder)",
"build-styleguide": "rimraf dist/styleguide/ && kss --config kss/kss-config.json --custom hidemarkup --custom hideexample --custom hidedefault --custom fakeexample --placeholder .modifier-class"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.3.3",
"@angular/common": "^4.3.2",
"@angular/compiler": "^4.3.2",
"@angular/core": "^4.3.2",
"@angular/forms": "^4.3.2",
"@angular/http": "^4.3.2",
"@angular/platform-browser": "^4.3.2",
"@angular/platform-browser-dynamic": "^4.3.2",
"@angular/router": "^4.3.2",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.28",
"bootstrap": "^4.0.0-alpha.6",
"classlist.js": "^1.1.20150312",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"ngx-mydatepicker": "^2.0.12",
"rxjs": "^5.4.2",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.16"
},
"devDependencies": {
"@angular/cli": "^1.2.3",
"@angular/compiler-cli": "^4.3.2",
"@types/jasmine": "^2.5.53",
"@types/node": "^8.0.15",
"codelyzer": "^3.1.2",
"fs-extra": "^4.0.0",
"jasmine-core": "^2.6.4",
"jasmine-spec-reporter": "^4.1.1",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "^1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"kss": "^3.0.0-beta.18",
"protractor": "^5.1.2",
"random-ext": "^2.5.1",
"ts-node": "^3.2.1",
"tslint": "^5.5.0",
"typedoc": "^0.7.1",
"typescript": "^2.4.2"
}
}
try that and then reinstall all of your project's dependencies
rm ./package-lock.json
rm -r ./node_modules
npm cache clear --force
There is a full thread on github about it, since june I think
这篇关于npm - 使用陈旧的包数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!