Open shishkin opened 2 years ago
Crossposted to https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/58679, since that may be the actual culprit.
The problem comes from Node being a bit picky with its module resolution, and requires file endings when importing a specific file. This can be solved by adding the appropriate export properties in the package.json
, as stated above.
A workaround solution is to include the file ending in your import statement, like this:
import "source-map-support/register.js"
When using
import "source-map-support/register"
on Typescript 4.5.5 with"module": "ES2020"
and"type": "module"
, I see :Root entry point import works without issues:
According to Typescript docs
package.json
might need explicit"exports"
with"types"
for theregister
entry point.