首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Node-red-node-sqlite npm install node-gyp问题

Node-red-node-sqlite npm install node-gyp问题
EN

Stack Overflow用户
提问于 2021-10-25 16:23:28
回答 1查看 326关注 0票数 0

我目前正在使用node-red开发一款覆盆子pi 3B+。当我尝试安装node-red- node -sqlite node时,问题就开始了。当我尝试从node-red pallete安装节点时,或者当我通过终端执行'npm install‘时,就会出现这种情况。

如果有人有经验分享可能的解决方案,我将非常感激。我已经试着解决它好几天了,

以下是错误日志:

代码语言:javascript
复制
npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

sqlite3@4.2.0 install /home/pi/.node-red/node_modules/sqlite3

node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download

node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-arm.tar.gz

node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.18.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)

gyp WARN install got an error, rolling back install

gyp ERR! configure error

gyp ERR! stack Error: read ECONNRESET

gyp ERR! stack at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)

gyp ERR! System Linux 4.19.66-v7+

gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"

gyp ERR! cwd /home/pi/.node-red/node_modules/sqlite3

gyp ERR! node -v v14.18.1

gyp ERR! node-gyp -v v5.1.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

node-pre-gyp ERR! stack at ChildProcess. (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28)

node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1058:16)

node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)

node-pre-gyp ERR! System Linux 4.19.66-v7+

node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/sqlite3

node-pre-gyp ERR! node -v v14.18.1

node-pre-gyp ERR! node-pre-gyp -v v0.11.0

node-pre-gyp ERR! not ok

Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v83-linux-arm --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! sqlite3@4.2.0 install: node-pre-gyp install --fallback-to-build

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the sqlite3@4.2.0 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /home/pi/.npm/_logs/2021-10-20T16_30_48_019Z-debug.log
EN

回答 1

Stack Overflow用户

发布于 2021-11-02 04:01:52

要安装节点版本的SQLite,也许可以先尝试全局安装node-gyp。

npm安装-g节点-gyp

此外,也许你会对Node.js感兴趣,所以我想为你分享这篇额外的读物:https://www.emqx.com/en/blog/how-to-use-mqtt-in-nodejs

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69711577

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档