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
$ git clone https://github.com/dorian-marchal/esm-issue
Cloning into 'esm-issue'...
$ cd esm-issue/
$ node -v
v10.14.1
$ npm ls esm
esm-issue@1.0.0 /tmp/esm-issue
└── esm@3.2.21
$ node without-esm.js
OK
$ node with-esm.js
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at dirname (path.js:1268:5)
at Object.<anonymous> (/tmp/esm-issue/with-esm.js:2:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
$ npm install esm@3.2.20
$ node with-esm.js
OK
The text was updated successfully, but these errors were encountered:
When a package with a faulty
main
entry is imported,esm
throws with:Without using
esm
,index.js
is used as the entry point.Note that this is a regression in 3.2.21. 3.2.20 works as expected.
Here is a small repro using
find-parent-dir
(a package with a badmain
entry): https://github.com/dorian-marchal/esm-issueThe text was updated successfully, but these errors were encountered: