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
According to the docs of ts-node, I have to switch from --require ts-node/register to --loader ts-node/esm.
I tried to change "require": ["ts-node/esm"] to "loader": ["ts-node/esm"] in my nyc.config.json but I am getting this error:
Must use import to load ES Module
Can you help me with a code recipe to solve that? Currently I am starting my tests with Jasmine without nyc: ts-node-esm ./node_modules/.bin/jasmine --config=jasmine.json.
Best,
Benny
The text was updated successfully, but these errors were encountered:
Hi there, I moved my TypeScript codebase from CommonJS to ESM (using
"type": "module"
in mypackage.json
file). Mynyc.config.json
looks like this:According to the docs of
ts-node
, I have to switch from--require ts-node/register
to--loader ts-node/esm
.I tried to change
"require": ["ts-node/esm"]
to"loader": ["ts-node/esm"]
in mynyc.config.json
but I am getting this error:Can you help me with a code recipe to solve that? Currently I am starting my tests with Jasmine without nyc:
ts-node-esm ./node_modules/.bin/jasmine --config=jasmine.json
.Best,
Benny
The text was updated successfully, but these errors were encountered: