Summary
This issue was raised as a result of this community forum entry.
TLDR:
Some libraries may require special NODE_OPTIONS to be passed, however this is currently not supported with any arguments (for example to the redwood.toml).
Motivation
Support of monero-javascript requires the --no-experimental-fetch flag to be passed in order to work with Node 18 LTS
Detailed proposal
When further testing the workaround described in the forum post, I found it annoying that anytime the @redwoodjs node_module changes, the manual changes become overwritten.
It would be ideal to have some place in the configuration of redwood to pass NODE_OPTIONS to any node process that runs the api side (or web side).
[api]
port = 8911
host = "0.0.0.0"
node_options="--no-experimental-fetch"
I have looked into injecting this flag manually in the devHandler @redwoodjs/cli/dist/commands/devHanlder where --enable-source-maps is passed with NODE_OPTIONS="--enable-source-maps --no-experimental-fetch" but I don't know how to make it persistent across installs of redwoodjs. Also, this only seems to fix the yarn rw dev process, but not a baremetal deploy.
Generally I am interested on implementing this, but I am totally new and would probably need a lot of hand-holding. Let me know!
Are you interested in working on this?
Summary
This issue was raised as a result of this community forum entry.
TLDR:
Some libraries may require special
NODE_OPTIONSto be passed, however this is currently not supported with any arguments (for example to the redwood.toml).Motivation
Support of monero-javascript requires the
--no-experimental-fetchflag to be passed in order to work with Node 18 LTSDetailed proposal
When further testing the workaround described in the forum post, I found it annoying that anytime the @redwoodjs node_module changes, the manual changes become overwritten.
It would be ideal to have some place in the configuration of redwood to pass NODE_OPTIONS to any node process that runs the api side (or web side).
I have looked into injecting this flag manually in the devHandler @redwoodjs/cli/dist/commands/devHanlder where --enable-source-maps is passed with
NODE_OPTIONS="--enable-source-maps --no-experimental-fetch"but I don't know how to make it persistent across installs of redwoodjs. Also, this only seems to fix theyarn rw devprocess, but not a baremetal deploy.Generally I am interested on implementing this, but I am totally new and would probably need a lot of hand-holding. Let me know!
Are you interested in working on this?