can not install an node with node-red Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
spereg53
Posts: 2
Joined: Tue May 25, 2021 1:29 am

can not install an node with node-red

Post by spereg53 »

please ,help me:
i have this installed:

Code: Select all

DietPi v7.2.3 : 00:06 - Sun 06/13/21
 ─────────────────────────────────────────────────────
 - Device model : RPi CM 3+ (armv7l)
 - CPU temp : 39'C : 102'F (Cool runnings)
 - LAN IP : 192.168.100.123 (eth0)
installed node-red from dietpi-software,user:root,
and from manage palette,can not install this node:node-red-contrib-msg-queue,this is the log,from: /mnt/dietpi_userdata/node-red/.npm/_logs:

Code: Select all

0 verbose cli [
0 verbose cli   '/usr/local/bin/node',
0 verbose cli   '/usr/local/bin/npm',
0 verbose cli   'install',
0 verbose cli   '--no-audit',
0 verbose cli   '--no-update-notifier',
0 verbose cli   '--no-fund',
0 verbose cli   '--save',
0 verbose cli   '--save-prefix=~',
0 verbose cli   '--production',
0 verbose cli   'node-red-contrib-msg-queue@1.0.2'
0 verbose cli ]
1 info using npm@7.15.1
2 info using node@v16.3.0
3 timing npm:load:whichnode Completed in 6ms
4 timing config:load:defaults Completed in 9ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 verbose config production Use `--omit=dev` instead.
8 timing config:load:cli Completed in 14ms
9 timing config:load:env Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/mnt/dietpi_userdata/node-red/.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 5ms
17 timing config:load:setEnvs Completed in 5ms
18 timing config:load Completed in 41ms
19 timing npm:load:configload Completed in 41ms
20 timing npm:load:setTitle Completed in 1ms
21 timing npm:load:setupLog Completed in 2ms
22 timing npm:load:cleanupLog Completed in 10ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 2ms
25 timing npm:load Completed in 64ms
26 timing config:load:flatten Completed in 14ms
27 timing arborist:ctor Completed in 4ms
28 timing idealTree:init Completed in 2799ms
29 timing idealTree:userRequests Completed in 15ms
30 silly idealTree buildDeps
31 silly fetch manifest node-red-contrib-msg-queue@1.0.2
32 timing arborist:ctor Completed in 1ms
33 http fetch GET 304 https://registry.npmjs.org/node-red-contrib-msg-queue 2165ms (from cache)
34 silly placeDep ROOT node-red-contrib-msg-queue@1.0.2 OK for:  want: 1.0.2
35 silly fetch manifest node-persistent-queue@^0.3.1
36 silly fetch manifest shallowequal@^1.0.1
37 http fetch GET 304 https://registry.npmjs.org/node-persistent-queue 96ms (from cache)
38 http fetch GET 304 https://registry.npmjs.org/shallowequal 222ms (from cache)
39 timing idealTree:#root Completed in 2432ms
40 silly placeDep ROOT node-persistent-queue@0.3.1 OK for: node-red-contrib-msg-queue@1.0.2 want: ^0.3.1
41 silly placeDep ROOT shallowequal@1.1.0 OK for: node-red-contrib-msg-queue@1.0.2 want: ^1.0.1
42 silly fetch manifest sqlite3@^4.0.4
43 http fetch GET 304 https://registry.npmjs.org/sqlite3 88ms (from cache)
44 timing idealTree:node_modules/node-red-contrib-msg-queue Completed in 134ms
45 silly placeDep ROOT sqlite3@4.2.0 OK for: node-persistent-queue@0.3.1 want: ^4.0.4
46 silly fetch manifest node-pre-gyp@^0.11.0
47 http fetch GET 304 https://registry.npmjs.org/node-pre-gyp 94ms (from cache)
48 timing idealTree:node_modules/node-persistent-queue Completed in 126ms
49 timing idealTree:node_modules/shallowequal Completed in 0ms
50 silly placeDep node_modules/sqlite3 node-pre-gyp@0.11.0 OK for: sqlite3@4.2.0 want: ^0.11.0
51 silly fetch manifest nopt@^4.0.1
52 silly fetch manifest semver@^5.3.0
53 silly fetch manifest tar@^4
54 http fetch GET 304 https://registry.npmjs.org/semver 139ms (from cache)
55 http fetch GET 304 https://registry.npmjs.org/nopt 160ms (from cache)
56 http fetch GET 304 https://registry.npmjs.org/tar 242ms (from cache)
57 timing idealTree:node_modules/sqlite3 Completed in 296ms
58 silly placeDep node_modules/sqlite3 nopt@4.0.3 OK for: node-pre-gyp@0.11.0 want: ^4.0.1
59 silly placeDep node_modules/sqlite3 semver@5.7.1 OK for: node-pre-gyp@0.11.0 want: ^5.3.0
60 silly placeDep node_modules/sqlite3 tar@4.4.13 OK for: node-pre-gyp@0.11.0 want: ^4
61 silly fetch manifest chownr@^1.1.1
62 silly fetch manifest fs-minipass@^1.2.5
63 silly fetch manifest minipass@^2.8.6
64 silly fetch manifest minizlib@^1.2.1
65 silly fetch manifest yallist@^3.0.3
66 http fetch GET 304 https://registry.npmjs.org/chownr 168ms (from cache)
67 http fetch GET 304 https://registry.npmjs.org/fs-minipass 170ms (from cache)
68 http fetch GET 304 https://registry.npmjs.org/minipass 175ms (from cache)
69 http fetch GET 304 https://registry.npmjs.org/minizlib 273ms (from cache)
70 http fetch GET 304 https://registry.npmjs.org/yallist 282ms (from cache)
71 timing idealTree:node_modules/sqlite3/node_modules/node-pre-gyp Completed in 329ms
72 timing idealTree:node_modules/sqlite3/node_modules/nopt Completed in 0ms
73 timing idealTree:node_modules/sqlite3/node_modules/semver Completed in 0ms
74 silly placeDep node_modules/sqlite3 chownr@1.1.4 OK for: tar@4.4.13 want: ^1.1.1
75 silly placeDep node_modules/sqlite3 fs-minipass@1.2.7 OK for: tar@4.4.13 want: ^1.2.5
76 silly placeDep node_modules/sqlite3 minipass@2.9.0 OK for: tar@4.4.13 want: ^2.8.6
77 silly placeDep node_modules/sqlite3 minizlib@1.3.3 OK for: tar@4.4.13 want: ^1.2.1
78 silly placeDep node_modules/sqlite3 yallist@3.1.1 OK for: tar@4.4.13 want: ^3.0.3
79 timing idealTree:node_modules/sqlite3/node_modules/tar Completed in 27ms
80 timing idealTree:node_modules/sqlite3/node_modules/chownr Completed in 0ms
81 timing idealTree:node_modules/sqlite3/node_modules/fs-minipass Completed in 0ms
82 timing idealTree:node_modules/sqlite3/node_modules/minipass Completed in 0ms
83 timing idealTree:node_modules/sqlite3/node_modules/minizlib Completed in 0ms
84 timing idealTree:node_modules/sqlite3/node_modules/yallist Completed in 0ms
85 timing idealTree:buildDeps Completed in 3354ms
86 timing idealTree:fixDepFlags Completed in 88ms
87 timing idealTree Completed in 6316ms
88 timing reify:loadTrees Completed in 6319ms
89 timing reify:diffTrees Completed in 1060ms
90 silly reify moves {}
91 timing reify:retireShallow Completed in 1ms
92 timing reify:createSparse Completed in 21ms
93 timing reify:trashOmits Completed in 4ms
94 timing reify:loadBundles Completed in 0ms
95 timing reifyNode:node_modules/sqlite3/node_modules/fs-minipass Completed in 563ms
96 timing reifyNode:node_modules/sqlite3/node_modules/chownr Completed in 564ms
97 timing reifyNode:node_modules/sqlite3/node_modules/minizlib Completed in 572ms
98 timing reifyNode:node_modules/sqlite3/node_modules/minipass Completed in 572ms
99 timing reifyNode:node_modules/sqlite3/node_modules/yallist Completed in 579ms
100 timing reifyNode:node_modules/shallowequal Completed in 577ms
101 timing reifyNode:node_modules/sqlite3/node_modules/nopt Completed in 593ms
102 timing reifyNode:node_modules/sqlite3/node_modules/semver Completed in 596ms
103 timing reifyNode:node_modules/node-persistent-queue Completed in 602ms
104 timing reifyNode:node_modules/node-red-contrib-msg-queue Completed in 638ms
105 timing reifyNode:node_modules/sqlite3/node_modules/tar Completed in 653ms
106 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
107 timing reifyNode:node_modules/sqlite3/node_modules/node-pre-gyp Completed in 664ms
108 timing reifyNode:node_modules/sqlite3 Completed in 728ms
109 timing reify:unpack Completed in 730ms
110 timing reify:unretire Completed in 1ms
111 timing build:queue Completed in 6ms
112 timing build:link:node_modules/sqlite3/node_modules/node-pre-gyp Completed in 12ms
113 timing build:link:node_modules/sqlite3/node_modules/semver Completed in 8ms
114 timing build:link:node_modules/sqlite3/node_modules/nopt Completed in 9ms
115 timing build:link Completed in 13ms
116 info run sqlite3@4.2.0 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
117 info run sqlite3@4.2.0 install { code: 1, signal: null }
118 timing reify:rollback:createSparse Completed in 164ms
119 timing reify:rollback:retireShallow Completed in 0ms
120 timing command:install Completed in 15594ms
121 verbose stack Error: command failed
121 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
121 verbose stack     at ChildProcess.emit (node:events:394:28)
121 verbose stack     at maybeClose (node:internal/child_process:1067:16)
121 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
122 verbose pkgid sqlite3@4.2.0
123 verbose cwd /mnt/dietpi_userdata/node-red
124 verbose Linux 5.10.17-v7+
125 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--no-audit" "--no-update-notifier" "--no-fund" "--save" "--save-prefix=~" "--production" "node-red-contrib-msg-queue@1.0.2"
126 verbose node v16.3.0
127 verbose npm  v7.15.1
128 error code 1
129 error path /mnt/dietpi_userdata/node-red/node_modules/sqlite3
130 error command failed
131 error command sh -c node-pre-gyp install --fallback-to-build
132 error make: Entering directory '/mnt/dietpi_userdata/node-red/node_modules/sqlite3/build'
132 error   ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
132 error make: Leaving directory '/mnt/dietpi_userdata/node-red/node_modules/sqlite3/build'
132 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=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
133 error node-pre-gyp info it worked if it ends with ok
133 error node-pre-gyp info using node-pre-gyp@0.11.0
133 error node-pre-gyp info using node@16.3.0 | linux | arm
133 error node-pre-gyp WARN Using request for node-pre-gyp https download
133 error node-pre-gyp info check checked for "/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm/node_sqlite3.node" (not found)
133 error node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-arm.tar.gz
133 error (node:14054) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
133 error (Use `node --trace-warnings ...` to show where the warning was created)
133 error node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-arm.tar.gz
133 error node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-arm.tar.gz
133 error node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@16.3.0 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
133 error node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-arm.tar.gz
133 error gyp info it worked if it ends with ok
133 error gyp info using node-gyp@7.1.2
133 error gyp info using node@16.3.0 | linux | arm
133 error gyp info ok
133 error gyp info it worked if it ends with ok
133 error gyp info using node-gyp@7.1.2
133 error gyp info using node@16.3.0 | linux | arm
133 error gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
133 error (node:14077) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
133 error (Use `node --trace-deprecation ...` to show where the warning was created)
133 error gyp info spawn /usr/bin/python3
133 error gyp info spawn args [
133 error gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
133 error gyp info spawn args   'binding.gyp',
133 error gyp info spawn args   '-f',
133 error gyp info spawn args   'make',
133 error gyp info spawn args   '-I',
133 error gyp info spawn args   '/mnt/dietpi_userdata/node-red/node_modules/sqlite3/build/config.gypi',
133 error gyp info spawn args   '-I',
133 error gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
133 error gyp info spawn args   '-I',
133 error gyp info spawn args   '/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.3.0/include/node/common.gypi',
133 error gyp info spawn args   '-Dlibrary=shared_library',
133 error gyp info spawn args   '-Dvisibility=default',
133 error gyp info spawn args   '-Dnode_root_dir=/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.3.0',
133 error gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
133 error gyp info spawn args   '-Dnode_lib_file=/mnt/dietpi_userdata/node-red/.cache/node-gyp/16.3.0/<(target_arch)/node.lib',
133 error gyp info spawn args   '-Dmodule_root_dir=/mnt/dietpi_userdata/node-red/node_modules/sqlite3',
133 error gyp info spawn args   '-Dnode_engine=v8',
133 error gyp info spawn args   '--depth=.',
133 error gyp info spawn args   '--no-parallel',
133 error gyp info spawn args   '--generator-output',
133 error gyp info spawn args   'build',
133 error gyp info spawn args   '-Goutput_dir=.'
133 error gyp info spawn args ]
133 error gyp info ok
133 error gyp info it worked if it ends with ok
133 error gyp info using node-gyp@7.1.2
133 error gyp info using node@16.3.0 | linux | arm
133 error gyp info spawn make
133 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
133 error /bin/sh: 1: python: not found
133 error make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
133 error gyp ERR! build error
133 error gyp ERR! stack Error: `make` failed with exit code: 2
133 error gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
133 error gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
133 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
133 error gyp ERR! System Linux 5.10.17-v7+
133 error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
133 error gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/sqlite3
133 error gyp ERR! node -v v16.3.0
133 error gyp ERR! node-gyp -v v7.1.2
133 error gyp ERR! not ok
133 error node-pre-gyp ERR! build error
133 error node-pre-gyp ERR! stack 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=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/mnt/dietpi_userdata/node-red/node_modules/sqlite3/lib/binding/node-v93-linux-arm --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
133 error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/mnt/dietpi_userdata/node-red/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
133 error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
133 error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
133 error node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
133 error node-pre-gyp ERR! System Linux 5.10.17-v7+
133 error node-pre-gyp ERR! command "/usr/local/bin/node" "/mnt/dietpi_userdata/node-red/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
133 error node-pre-gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/sqlite3
133 error node-pre-gyp ERR! node -v v16.3.0
133 error node-pre-gyp ERR! node-pre-gyp -v v0.11.0
133 error node-pre-gyp ERR! not ok
134 verbose exit 1
somebody,can help me ,thanks in advance
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: can not install an node with node-red

Post by Joulinar »

Hi,

looks like you are impacted by this issue https://github.com/node-red/node-red-nodes/issues/721

At least I see following issue

Code: Select all

133 error /bin/sh: 1: python: not found
What you could try is to set an alternative for python

Code: Select all

update-alternatives --install /usr/bin/python python2to3 /usr/bin/python3 1
And try to install node-red-contrib-msg-queue again

Code: Select all

cd /mnt/dietpi_userdata/node-red/
sudo -u nodered npm i node-red-contrib-msg-queue
systemctl restart node-red.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
spereg53
Posts: 2
Joined: Tue May 25, 2021 1:29 am

Re: can not install an node with node-red

Post by spereg53 »

thanks,solved,the node is working now
Post Reply