Closed maxmilton closed 6 years ago
Hi @MaxMilton!
It looks like this is a bindings.js issue.
Have you tried deleting your node_modules
folder and reinstalling everything?
Update:
~~It looks like the npm registry is experiencing issues at the moment. Related to https://github.com/npm/npm/issues/18434#issuecomment-355775144.~~
Update:
The npm registry issue is resolved.
The problem still persists even after removing the node_modules directory and the npm and yarn caches.
Could you create a small repro repo for me to look at?
I had a similar issue, first I started getting the same error, after repeatedly to remove node_modules and reinstalling the error changed from this to "[ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string" in serveral packages on of them beeing express which I have working in an other project with 0.19.1 ... does @std/esm
do any caching somewhere on its own. since this seems so eradic and inconsistent it looks like something npm / caching related. going back to 0.18.0 also fixed it for me.
@jdalton I've put together a repo with a minimal reproduction of the bug: https://github.com/MaxMilton/reproduce-esm-bug
I've put comments etc. to try to explain things but please let me know if there's anything else I can help with! :)
Thank you @MaxMilton! I can reproduce the error too! Digging in...
Update:
Found the bug! When in the parsing mode I didn't skip non-js compilers so the .node
compile was happening twice which caused the Module did not self-register
to be thrown.
Update:
Patched https://github.com/standard-things/esm/commit/9147ba7c31e85064f1eb6b5a64e2a5e4bb165587, https://github.com/standard-things/esm/commit/07d83bf7a1e3c1f1aa2fbf9ff659fac5fec1b5a1, https://github.com/standard-things/esm/commit/53b62705407299dce2969f137ab5bb065b847f76.
Nice catch! :star2: :100:
Since version
0.19.0
I've had this error appear when starting node:Not sure as to what's going on to be honest. Here's the source for the bindings.js from the stacktrace. Also my index.js:
Things work normally after reverting back to version
0.18.0
.