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
When an import throws an invalid module type for the file extension as follows:
This file is being treated as an ES module because it has a '.js' file extension and '/home/sherlox/workspace/OPENSOURCE/IMPORT_FROM/import-from-esm-repro-1/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
the error is caught by import-from-esm, which then throws the generic Cannot find module error message.
import-from-esm should not obfuscate this message, so the end user can understand the real cause of the issue.
Currently, the only way to see this error is by using DEBUG=import-from-esm.
Steps to reproduce:
npm install
cd playground/
npm install
npx semantic-release
When an import throws an invalid module type for the file extension as follows:
the error is caught by import-from-esm, which then throws the generic
Cannot find module
error message.import-from-esm
should not obfuscate this message, so the end user can understand the real cause of the issue.Currently, the only way to see this error is by using
DEBUG=import-from-esm
.Steps to reproduce:
npm install cd playground/ npm install npx semantic-release
Reproduction repo
The text was updated successfully, but these errors were encountered: