You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is still present in the current beta version of this adapter
There is no other (open) issue with the same topic (use the search!)
This issue is not described in the adapter documentation / FAQ (read the docs!)
Script type
Blockly, Javascript
The problem
I configured additional "NPM Module" in instances, named "simple-ssh" After a JS adapter update it is almost NOT working, I can see these entries in logs (truncated a bit):
javascript.0 | 2024-03-18 11:53:23.334 | error | script.js.common.MYSCRIPT: SSH is not a constructor
javascript.0 | 2024-03-18 11:53:23.334 | error | at Immediate._onImmediate (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8489:62)
javascript.0 | 2024-03-18 11:53:23.334 | error | at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:641:29)
javascript.0 | 2024-03-18 11:53:23.334 | error | at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1390:38)
javascript.0 | 2024-03-18 11:53:23.334 | error | at Object.<anonymous> (script.js.common.1.MYSCRIPT:25:9)
javascript.0 | 2024-03-18 11:53:23.334 | error | at setSwitchPort1PoE (script.js.common.1.MYSCRIPT:5:15)
javascript.0 | 2024-03-18 11:53:23.334 | error | at require (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:528:32)
javascript.0 | 2024-03-18 11:53:23.334 | error | at require (node:internal/modules/cjs/helpers:121:18)
javascript.0 | 2024-03-18 11:53:23.333 | error | at Module.require (node:internal/modules/cjs/loader:1143:19)
javascript.0 | 2024-03-18 11:53:23.333 | error | script.js.common.1.MYSCRIPT: Error: Cannot find module 'simple-ssh'
The usage is inside blockly having a JS function var SSH = require('simple-ssh');
A workaround is to REMOVE the NPM module, save and restart javascript adapter, and then add it again.
But if you forget it after update, scripts will just fail :(
I just verified it still happening with Adapter v7.9.1
iobroker.current.log (in debug mode!)
No response
Version of nodejs
v18.17.1
Version of ioBroker js-controller
5.0.19
Version of adapter
7.9.1
The text was updated successfully, but these errors were encountered:
I'm sure that
Script type
Blockly, Javascript
The problem
I configured additional "NPM Module" in instances, named "simple-ssh" After a JS adapter update it is almost NOT working, I can see these entries in logs (truncated a bit):
The usage is inside blockly having a JS function
var SSH = require('simple-ssh');
A workaround is to REMOVE the NPM module, save and restart javascript adapter, and then add it again.
But if you forget it after update, scripts will just fail :(
I just verified it still happening with Adapter v7.9.1
iobroker.current.log (in debug mode!)
No response
Version of nodejs
v18.17.1
Version of ioBroker js-controller
5.0.19
Version of adapter
7.9.1
The text was updated successfully, but these errors were encountered: