[英]error trying to install @babel/preset-env
i am trying to install @babel/preset-env in node and i am getting the following question我正在尝试在节点中安装@babel/preset-env,我收到以下问题
npm install @babel/preset-env --save-dev
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-PMnY0yhKljgjrP3jQNP5C9slQM//bCLO4ZRr9gmo+2mLkVhCIxhT3A9grgblgLXmOPVd6GFzeIEA6/0g99cxDA== integrity checksum failed when
using sha512: wanted sha512-PMnY0yhKljgjrP3jQNP5C9slQM//bCLO4ZRr9gmo+2mLkVhCIxhT3A9grgblgLXmOPVd6GFzeIEA6/0g99cxDA== but got sha512-IU+YnDh7WJASsz892TYz1eQ+vaEypoAPLmu6DO2Uw2NZzfl/F2ypEL3xrEiIXLU8Buok1TujSujt3bLMmUmysg==. (34788 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/@babel%2fplugin-transform-member-expression-literals: Integrity verification failed for sha512-PMnY0yhKljgjrP3jQNP5C9slQM//bCLO4ZRr9gmo+2mLkVhCIxhT3A9grgblgLXmOPVd6GFzeIEA6/0g99cxDA== (C:\Users\PRO\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\3c\c9\d8d3284a963823acfde340d3f90bdb2540cfff6c22cee1946bf609a8fb698b915842231853dc0f60ae06e580b5e638f55de86173788100ebfd20f7d7310c)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PRO\AppData\Roaming\npm-cache\_logs\2019-10-18T22_56_31_231Z-debug.log
try this one of these solutions试试这些解决方案之一
npm cache verify --force
packages-lock.json
packages-lock.json
npm cache clean --force
node_modules
node_modules
Usually, this means your local npm cache or your package-lock.json has been corrupted, causing of @babel/preset-env
's integrity hash from the npm registry to be different from what you have in your package-lock.json
. Usually, this means your local npm cache or your package-lock.json has been corrupted, causing of
@babel/preset-env
's integrity hash from the npm registry to be different from what you have in your package-lock.json
. I'd do these steps in this order.我会按此顺序执行这些步骤。
rm -rf node_modules
rm package-lock.json
npm cache clean -f
npm cache verify -f
npm i
This should remove any cached data you have and force npm to hit the registry for fresh package data and regenerate your package-lock.json
to use the updated integrity hash. This should remove any cached data you have and force npm to hit the registry for fresh package data and regenerate your
package-lock.json
to use the updated integrity hash.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.