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
And further set the package.json "type": "module". This makes "verbatimModuleSyntax":true a requirement. Otherwise node would complain on "import { some } from './'" statements without a trailing ".js" extension.
Node.js v21.6.2
✖ tsc-output/test-import.test.js (73.202709ms)
'test failed'
node:internal/modules/esm/resolve:263
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '<filepath-without-js-extension>' imported from tsc-output/test-import.test.js
at finalizeResolution (node:internal/modules/esm/resolve:263:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1131:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///<filepath-without-js-extension>'
}
Version
^29.1.1
Steps to reproduce
Install:
Setup your configuration file:
Try to run a test that uses ESM modules and you'll get this error:
Expected behavior
I would expect the modules to load correctly.
Actual behavior
The modules do not load at all.
Debug log
Too long
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: