elquero avatar image

[VenusOS 2.80~large20] @victronenergy/node-red-contrib-victron update from 1.4.1 to 1.4.2 fails

Hi, after manually updating the OS to the 2.80~large20 version I've noticed that there was also an update for the "@victronenergy/node-red-contrib-victron" NodeRED package, raising it up to the 1.4.2 from the 1.4.1.
The update procedure fails because it needs the "/data/home/root/.node-red/node-modules/@victronenergy" folder, but on the filesystem it is a file! Here is the failure log:

2021-08-27T08:34:16.028Z Install : @victronenergy/node-red-contrib-victron 1.4.2

2021-08-27T08:34:16.380Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict @victronenergy/node-red-contrib-victron@1.4.2
2021-08-27T08:34:53.239Z [err] npm
2021-08-27T08:34:53.241Z [err]  WARN rollback Rolling back ms@2.1.2 failed (this is probably harmless): ENOTDIR: not a directory, lstat '/data/home/root/.node-red/node_modules/@victronenergy/node-red-contrib-victron/node_modules/ms'
2021-08-27T08:34:53.858Z [err] npm
2021-08-27T08:34:53.859Z [err]  ERR! code ENOTDIR
2021-08-27T08:34:53.859Z [err] npm ERR! syscall mkdir
2021-08-27T08:34:53.859Z [err] npm ERR! path
2021-08-27T08:34:53.860Z [err]  /data/home/root/.node-red/node_modules/@victronenergy/node-red-contrib-victron/node_modules
2021-08-27T08:34:53.860Z [err] npm ERR! errno -20
2021-08-27T08:34:53.876Z [err] npm
2021-08-27T08:34:53.877Z [err]  ERR! ENOTDIR: not a directory, mkdir '/data/home/root/.node-red/node_modules/@victronenergy/node-red-contrib-victron/node_modules'
2021-08-27T08:34:53.955Z [err]
2021-08-27T08:34:53.957Z [err] npm ERR! A complete log of this run can be found in:
2021-08-27T08:34:53.957Z [err] npm ERR!     /home/root/.npm/_logs/2021-08-27T08_34_53_933Z-debug.log
2021-08-27T08:34:53.992Z rc=236

I've also tried to manually create the folder and re-issue the update, but some error and warnings about the downloaded code raise:

2021-08-27T08:43:12.742Z Install : @victronenergy/node-red-contrib-victron 1.4.2

2021-08-27T08:43:12.936Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict @victronenergy/node-red-contrib-victron@1.4.2
2021-08-27T08:43:46.776Z [out]
2021-08-27T08:43:46.776Z [out] > abstract-socket@2.1.1 install /data/home/root/.node-red/node_modules/abstract-socket
2021-08-27T08:43:46.776Z [out] > node-gyp rebuild
2021-08-27T08:43:46.776Z [out]
2021-08-27T08:44:12.468Z [out] make: Entering directory '/data/home/root/.node-red/node_modules/abstract-socket/build'
2021-08-27T08:44:12.472Z [out]   CXX(target) Release/
2021-08-27T08:44:19.619Z [err] In file included from ../../nan/nan.h:58,
2021-08-27T08:44:19.619Z [err]                  from ../src/
2021-08-27T08:44:19.619Z [err] /home/root/.cache/node-gyp/12.21.0/include/node/node.h:737:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
2021-08-27T08:44:19.619Z [err]   737 |       (node::addon_register_func) (regfunc),                          \
2021-08-27T08:44:19.619Z [err]       |                                           ^
2021-08-27T08:44:19.619Z [err] /home/root/.cache/node-gyp/12.21.0/include/node/node.h:771:3: note: in expansion of macro 'NODE_MODULE_X'
2021-08-27T08:44:19.619Z [err]   771 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
2021-08-27T08:44:19.619Z [err]       |   ^~~~~~~~~~~~~
2021-08-27T08:44:19.619Z [err] ../src/ note: in expansion of macro 'NODE_MODULE'
2021-08-27T08:44:19.619Z [err]   181 | NODE_MODULE(abstract_socket, Initialize)
2021-08-27T08:44:19.619Z [err]       | ^~~~~~~~~~~
2021-08-27T08:44:22.148Z [out]   SOLINK_MODULE(target) Release/
2021-08-27T08:44:22.800Z [out]   COPY Release/bindings.node
2021-08-27T08:44:22.843Z [out] make: Leaving directory '/data/home/root/.node-red/node_modules/abstract-socket/build'
2021-08-27T08:44:23.847Z [out] + @victronenergy/node-red-contrib-victron@1.4.2
2021-08-27T08:44:23.847Z [out] added 29 packages from 72 contributors and removed 13 packages in 58.326s
2021-08-27T08:44:23.904Z rc=0

After that I've tried to restart NodeRED (actually I've restarted the controller, if you can suggest how to do that I'll be really grateful) but it won't start anymore, always for the same problem about the file/folder "@victronenergy".

I've also tried from console, by running "npm install @victronenergy/node-red-contrib-victron" but the same problems verifies.

Someone has encountered the same problem?

Venus OSNode-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi, the recommend way to get to the new node-red-contrib-victron version is to await a new Venus OS large build from me.

We don't support self updating or installing of modules (like this one) which are included in the main image.

I'll be making a new build, probably this weekend. It will also go to nodejs v14 (I think we're now on 12?) and a few more things.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Hi @mvader (Victron Energy) ,

will you make a Pi 4 version as well?

Kind regards