tprelog / iocage-node-red

Node-RED - TrueNAS CORE Community Plugin
2 stars 5 forks source link

Error Instaling Some Packages #1

Closed soloam closed 5 years ago

soloam commented 5 years ago

Hello, I tried this script, but I get this error when I try to install some packages:

-----------------------------------------------------------
2019-03-14T17:30:40.221Z Install : node-red-contrib-mysensors 3.2.0

2019-03-14T17:30:40.229Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-mysensors@3.2.0
2019-03-14T17:30:44.593Z [out] 
2019-03-14T17:30:44.593Z [out] > sqlite3@4.0.6 install /usr/home/nodered/node_modules/sqlite3
2019-03-14T17:30:44.593Z [out] > node-pre-gyp install --fallback-to-build
2019-03-14T17:30:44.593Z [out] 
2019-03-14T17:30:44.796Z [err] node-pre-gyp
2019-03-14T17:30:44.797Z [err]  
2019-03-14T17:30:44.797Z [err] WARN 
2019-03-14T17:30:44.797Z [err] Using request for node-pre-gyp https download 
2019-03-14T17:30:45.345Z [err] node-pre-gyp
2019-03-14T17:30:45.345Z [err]  WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/node-v57-freebsd-x64.tar.gz 
2019-03-14T17:30:45.345Z [err] node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and node@8.15.1 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) 
2019-03-14T17:30:47.435Z [out] gmake: Entering directory '/usr/home/nodered/node_modules/sqlite3/build'
2019-03-14T17:30:47.435Z [out]   ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c
2019-03-14T17:30:47.438Z [err] /bin/sh: python: not found
2019-03-14T17:30:47.438Z [err] gmake: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3260000/sqlite3.c] Error 127
2019-03-14T17:30:47.438Z [out] gmake: Leaving directory '/usr/home/nodered/node_modules/sqlite3/build'
2019-03-14T17:30:47.440Z [err] gyp
2019-03-14T17:30:47.440Z [err]  
2019-03-14T17:30:47.440Z [err] ERR!
2019-03-14T17:30:47.440Z [err]  
2019-03-14T17:30:47.440Z [err] build error 
2019-03-14T17:30:47.440Z [err] gyp
2019-03-14T17:30:47.440Z [err]  ERR! stack
2019-03-14T17:30:47.440Z [err]  Error: `gmake` failed with exit code: 2
2019-03-14T17:30:47.440Z [err] gyp 
2019-03-14T17:30:47.440Z [err] ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
2019-03-14T17:30:47.441Z [err] gyp ERR! stack
2019-03-14T17:30:47.441Z [err]      at emitTwo (events.js:126:13)
2019-03-14T17:30:47.441Z [err] gyp ERR!
2019-03-14T17:30:47.441Z [err]  stack     at ChildProcess.emit (events.js:214:7)
2019-03-14T17:30:47.441Z [err] gyp
2019-03-14T17:30:47.441Z [err]  ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
2019-03-14T17:30:47.441Z [err] gyp
2019-03-14T17:30:47.441Z [err]  ERR! System
2019-03-14T17:30:47.441Z [err]  FreeBSD 11.2-STABLE
2019-03-14T17:30:47.441Z [err] gyp
2019-03-14T17:30:47.441Z [err]  ERR! command
2019-03-14T17:30:47.441Z [err]  "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57"
2019-03-14T17:30:47.441Z [err] gyp
2019-03-14T17:30:47.441Z [err]  ERR! cwd
2019-03-14T17:30:47.441Z [err]  /usr/home/nodered/node_modules/sqlite3
2019-03-14T17:30:47.441Z [err] gyp 
2019-03-14T17:30:47.441Z [err] ERR! node -v v8.15.1
2019-03-14T17:30:47.441Z [err] gyp ERR!
2019-03-14T17:30:47.441Z [err]  node-gyp -v v3.8.0
2019-03-14T17:30:47.441Z [err] gyp ERR! 
2019-03-14T17:30:47.441Z [err] not ok 
2019-03-14T17:30:47.444Z [err] node-pre-gyp
2019-03-14T17:30:47.444Z [err]  ERR! build error 
2019-03-14T17:30:47.444Z [err] node-pre-gyp
2019-03-14T17:30:47.444Z [err]  ERR! stack
2019-03-14T17:30:47.444Z [err]  Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
2019-03-14T17:30:47.444Z [err] node-pre-gyp 
2019-03-14T17:30:47.444Z [err] ERR! stack     at ChildProcess.<anonymous> (/usr/home/nodered/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2019-03-14T17:30:47.444Z [err] node-pre-gyp
2019-03-14T17:30:47.444Z [err]  ERR! stack     at emitTwo (events.js:126:13)
2019-03-14T17:30:47.444Z [err] node-pre-gyp ERR! 
2019-03-14T17:30:47.444Z [err] stack     at ChildProcess.emit (events.js:214:7)
2019-03-14T17:30:47.444Z [err] node-pre-gyp 
2019-03-14T17:30:47.444Z [err] ERR! stack     at maybeClose (internal/child_process.js:915:16)
2019-03-14T17:30:47.444Z [err] node-pre-gyp 
2019-03-14T17:30:47.444Z [err] ERR! 
2019-03-14T17:30:47.444Z [err] stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
2019-03-14T17:30:47.444Z [err] node-pre-gyp
2019-03-14T17:30:47.444Z [err]  ERR!
2019-03-14T17:30:47.444Z [err]  System FreeBSD 11.2-STABLE
2019-03-14T17:30:47.444Z [err] node-pre-gyp
2019-03-14T17:30:47.444Z [err]  ERR! command
2019-03-14T17:30:47.444Z [err]  "/usr/local/bin/node" "/usr/home/nodered/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2019-03-14T17:30:47.444Z [err] node-pre-gyp ERR!
2019-03-14T17:30:47.444Z [err]  cwd /usr/home/nodered/node_modules/sqlite3
2019-03-14T17:30:47.444Z [err] node-pre-gyp ERR!
2019-03-14T17:30:47.444Z [err]  node -v v8.15.1
2019-03-14T17:30:47.444Z [err] node-pre-gyp 
2019-03-14T17:30:47.444Z [err] ERR! node-pre-gyp -v v0.11.0
2019-03-14T17:30:47.444Z [err] node-pre-gyp ERR!
2019-03-14T17:30:47.444Z [err]  not ok 
2019-03-14T17:30:47.445Z [out] Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/home/nodered/node_modules/sqlite3/lib/binding/node-v57-freebsd-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1)
2019-03-14T17:30:47.590Z [err] npm
2019-03-14T17:30:47.590Z [err]  ERR! code ELIFECYCLE
2019-03-14T17:30:47.590Z [err] npm ERR! errno 1
2019-03-14T17:30:47.591Z [err] npm
2019-03-14T17:30:47.591Z [err]  ERR! sqlite3@4.0.6 install: `node-pre-gyp install --fallback-to-build`
2019-03-14T17:30:47.591Z [err] npm ERR! Exit status 1
2019-03-14T17:30:47.591Z [err] npm ERR! 
2019-03-14T17:30:47.591Z [err] npm 
2019-03-14T17:30:47.591Z [err] ERR! Failed at the sqlite3@4.0.6 install script.
2019-03-14T17:30:47.591Z [err] npm ERR!
2019-03-14T17:30:47.591Z [err]  This is probably not a problem with npm. There is likely additional logging output above.
2019-03-14T17:30:47.911Z [err] 
2019-03-14T17:30:47.911Z [err] npm ERR! A complete log of this run can be found in:
2019-03-14T17:30:47.911Z [err] npm ERR!     /usr/home/nodered/.npm/_logs/2019-03-14T17_30_47_596Z-debug.log
2019-03-14T17:30:47.924Z rc=1

Somting about sqlite3

tprelog commented 5 years ago

Hello - You fix this by installing python inside the jail.

iocage console node-red
pkg install python

After this I was able to install node-red-contrib-mysensors from the Node-RED web GUI

soloam commented 5 years ago

that solved it thank you