Closed lukiffer closed 5 months ago
Hi @lukiffer, sorry you're encountering an issue with this package!
Could you please run the failing command with the DEBUG=import-from-esm
env variable? This will log every path it has tried to resolve.
Here's the actual output: https://gist.github.com/lukiffer/fd3f0b38960555b7bb808fdb5edc42f7
(I think) the issue is with the first resolve attempt:
Trying to resolve '@bdrk/semantic-release-config/npm'
In this case, a file does in fact exist at node_modules/@bdrk/semantic-release-config/npm/index.js
but is throwing ERR_MODULE_NOT_FOUND
.
Moving the file to ./npm.js
(with type="commonjs"
in package.json
) or moving it to ./npm.cjs
both work fine. So it seems like it's either not trying the index.js
default, or having some trouble locating it.
Ok, I found the issue. I'm working on a fix and should be releasing that in the next few hours, will keep you updated. Thanks for the heads up!
:tada: This issue has been resolved in version 1.3.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Renovate should update the dependency on the various @semantic-release repos in the next few hours!
Feel free to reopen if you're still getting an issue after upgrading :smile:
EDIT: forgot @semantic-release repositories didn't use pinned versions, so you just need to update your lockfile with npm update import-from-esm
, but it seems you're using npx
to run semantic-release
so none of the above should be needed :)
Ran into an issue when using semantic-release with a shared config (CommonJS) using subpaths.
With a destination package
@example/package/subpath
, assuming the target file in the package@example/package
exists in./subpath/index.js
, I get something like the following:If I instead move and rename the target file from
./subpath/index.js
to./subpath.cjs
this works as expected.I'm not sure if this is something that
import-from
previously masked or if./subpath/index.js
should actually be checked, and if so why it's failing to find the root package.