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
node-red uses internally vm.createScript for the function node to run code which the user can provide in the web interface of node-red.
I need to run node-red with bun to support esm-modules, so I can write node-red extensions which are compiled by bun build.
$ bun run --bun node-red
[...]
0 Jan 23:47:55 - [error] [function:Screenshot] TypeError: vm.createScript is not a function. (In 'vm.createScript(functionText, createVMOpt(node, ""))', 'vm.createScript' is undefined) (body:line 381)
20 Jan 23:47:55 - [error] [function:Split] TypeError: vm.createScript is not a function. (In 'vm.createScript(functionText, createVMOpt(node, ""))', 'vm.createScript' is undefined) (body:line 381)
[...]
What is the feature you are proposing to solve the problem?
Implement vm.createScript which is just a wrapper for calling vm.Script().
Forking node-red and adding the mentioned wrapper if vm.createScript doesn't exist. Creating a PR to node-red to use vm.Script instead of vm.createScript?
The text was updated successfully, but these errors were encountered:
What is the problem this feature would solve?
node-red uses internally
vm.createScript
for thefunction
node to run code which the user can provide in the web interface of node-red.I need to run node-red with bun to support esm-modules, so I can write node-red extensions which are compiled by
bun build
.What is the feature you are proposing to solve the problem?
Implement
vm.createScript
which is just a wrapper for callingvm.Script()
.See patlux/node-red@a587655
What alternatives have you considered?
Forking node-red and adding the mentioned wrapper if
vm.createScript
doesn't exist. Creating a PR to node-red to usevm.Script
instead ofvm.createScript
?The text was updated successfully, but these errors were encountered: