如何使用npm安装任何东西,如果一切都产生相同的错误?

huangapple go评论91阅读模式
英文:

How can I install anything using npm if everything yields the same error?

问题

每当我尝试通过npm安装任何内容时,我都会收到以下警告:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'tiletype@0.1.0',
npm WARN EBADENGINE   required: { node: '0.8.x || 0.10.x' },
npm WARN EBADENGINE   current: { node: 'v16.15.1', npm: '8.11.0' }
npm WARN EBADENGINE }

然后是以下错误(还有其他不太具体的错误):

npm ERR! code 1
npm ERR! path /home/ubuntu/projects/GitHub/AWCPT/opentrees-data/node_modules/mbtiles/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build

这包括npm installnpm install colorsnpm install sqlite3npm install tiletype。如何修复这个问题?

英文:

Any time I try to install anything via npm, I get this warning:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'tiletype@0.1.0',
npm WARN EBADENGINE   required: { node: '0.8.x || 0.10.x' },
npm WARN EBADENGINE   current: { node: 'v16.15.1', npm: '8.11.0' }
npm WARN EBADENGINE }

followed by this error (among several other less informative errors)

npm ERR! code 1
npm ERR! path /home/ubuntu/projects/GitHub/AWCPT/opentrees-data/node_modules/mbtiles/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build

This includes npm install, npm install colors, npm install sqlite3, and npm install tiletype. How do I fix this?

答案1

得分: 1

tiletype 包明显存在问题。
它需要 node 版本为 v0.8.x 或 0.10.x,而您正在运行的是 v16.15.1。
此外,tiletype v0.1.0 已经停止维护相当长时间了

也许,删除 node_modules 文件夹,然后从头重新安装所有包 (npm i) 可能会修复它。

如果不行,请检查这个包是从哪里来的。它是否在您的 package.json 中,还是作为另一个包的依赖项安装的?

英文:

There is clearly something wrong with the tiletype package.
It requires node v0.8.x or 0.10.x, while you're running v16.15.1.
On top of that, tiletype v0.1.0 is discontinued for quite a while.

Perhaps, deleting the node_modules folder and reinstalling all packages from scratch (npm i) would fix it.

If not, check where this package comes from. Is it in your package.json or is is installed as a dependency for another package?

huangapple
  • 本文由 发表于 2023年1月11日 01:09:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75073517.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定