Closed gareth-johnstone closed 11 months ago
I just had this issue and I found it was because I had, incidentally, converted the CJS require()
to ES's import()
. Have you verified you're using CJS?
I just had this issue and I found it was because I had, incidentally, converted the CJS
require()
to ES'simport()
. Have you verified you're using CJS?
Yes, using CJS, i think its producing the error because the npm modules im using is possibly using ES
Yes, same happens with the axios module since they started using ES modules.
I posted a workaround here: #1905
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
For anyone that is interested in this project, I created my own forks of both pkg and pkg-fetch:
If someone is interested in helping me create a PR or move your active PR to those repositories.
Thanks 🙏🏼
What version of pkg are you using?
5.8.1
What version of Node.js are you using?
18.16.1
What operating system are you using?
Windows 11
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node18
Describe the Bug
> pkg release.js --targets node18-win-x64 --out-path dist/Windows-x64
Then when running the produced executable:
Expected Behavior
It gives birth to an executable that works
To Reproduce
see above