Open douglasward opened 3 years ago
@douglasward Elder.js is written in cjs
and what this error is saying is that it can't be require
d it has to be imported.
Not possible with Elder.js current structure. Open to a PR to help resolve it, but currently don't have a business case for needing to upgrade to esm
yet. In fact one of the core packages we rely on doesn't support esm
yet so we'll have to wait a bit longer.
Thanks @nickreese. Do you think it would be worth noting this in the documentation? It references node-fetch
a few times. https://elderguide.com/tech/elderjs/#fetching-external-data.
I wanted to make a pull request, but I couldn't find a repo with the documentation checked into it
Here is the location to edit. Thank you for the PR: https://github.com/Elderjs/docs/blob/master/elderguide.com/elderjs.md
Using the latest version of node-fetch (3.0.0) causes the following error when requiring it in a route.js file for example:
Downloading to
2.6.5
"fixes" the error.