代码 EINVALIDTAGNAME npm 错误!标签名称无效“>=^16.0.0”:标签可能没有encodeURIComponent 编码的任何字符

2024-01-10

我下载了教程的项目文件夹并尝试运行 npm install。但是,我总是遇到这个错误 - 我检查了与此相关的现有开放问题,但没有一个真正符合我的问题和/或解决方案不起作用。我对编码非常陌生,因此如果有人可以向我解释错误的原因或为我指出正确的资源,我也会很高兴。任何帮助表示赞赏!

这是错误文件输出:

2086 http fetch GET 304 https://registry.npmjs.org/classnames 95ms (from cache)
2087 http fetch GET 304 https://registry.npmjs.org/lowlight 104ms (from cache)
2088 http fetch GET 304 https://registry.npmjs.org/youtube-player 111ms (from cache)
2089 http fetch GET 304 https://registry.npmjs.org/ajv 217ms (from cache)
2090 http fetch GET 200 https://registry.npmjs.org/highlight.js 841ms
2091 http fetch GET 304 https://registry.npmjs.org/katex 846ms (from cache)
2092 http fetch GET 304 https://registry.npmjs.org/httpplease 850ms (from cache)
2093 http fetch GET 304 https://registry.npmjs.org/victory-chart 864ms (from cache)
2094 http fetch GET 200 https://registry.npmjs.org/react-is 878ms
2095 http fetch GET 304 https://registry.npmjs.org/victory-pie 880ms (from cache)
2096 http fetch GET 304 https://registry.npmjs.org/victory-core 883ms (from cache)
2097 timing idealTree:node_modules/idyll-components Completed in 902ms
2098 timing idealTree:node_modules/idyll-component-children Completed in 0ms
2099 timing idealTree:node_modules/idyll-d3-component Completed in 0ms
2100 timing idealTree Completed in 110820ms
2101 timing command:install Completed in 110829ms
2102 verbose stack Error: Invalid tag name ">=^16.0.0": Tags may not have any characters that encodeURIComponent encodes.
2102 verbose stack     at invalidTagName (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:94:15)
2102 verbose stack     at fromRegistry (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:299:13)
2102 verbose stack     at Function.resolve (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:84:12)
2102 verbose stack     at Arborist.[nodeFromEdge] (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:901:37)
2102 verbose stack     at async Arborist.[loadPeerSet] (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1121:23)
2102 verbose stack     at async Arborist.[buildDepStep] (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:838:11)
2102 verbose stack     at async Arborist.buildIdealTree (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:209:7)
2102 verbose stack     at async Promise.all (index 1)
2102 verbose stack     at async Arborist.reify (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:131:5)
2102 verbose stack     at async Install.install (/home/johanna/.nvm/versions/node/v15.11.0/lib/node_modules/npm/lib/install.js:120:5)
2103 verbose cwd /home/johanna/Documents/SideProjects/Visualisation/spotify/dimensionality-reduction-master
2104 verbose Linux 5.4.0-54-generic
2105 verbose argv "/home/johanna/.nvm/versions/node/v15.11.0/bin/node" "/home/johanna/.nvm/versions/node/v15.11.0/bin/npm" "install"
2106 verbose node v15.11.0
2107 verbose npm  v7.6.3
2108 error code EINVALIDTAGNAME
2109 error Invalid tag name ">=^16.0.0": Tags may not have any characters that encodeURIComponent encodes.
2110 verbose exit 1

安装旧版对等依赖项应该可以让您运行

npm install --legacy-peer-deps
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

代码 EINVALIDTAGNAME npm 错误!标签名称无效“>=^16.0.0”:标签可能没有encodeURIComponent 编码的任何字符 的相关文章

随机推荐