英文:
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 install
,npm install colors
,npm install sqlite3
和npm 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?
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论