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
Sorry more of a newbie question I guess but recently I've updated things into my computer and one of my project using ts-node stopped to work.
After pushing some buttons and pulling some strings things got back to normal.
But now I have "type": "module" in my package.json
and I have to use ts-node-esm.
Firstly, why do I need to use ts-node-esm because type module is explicitly stated into package.json ?
But more importantly, why ts-node assume my project is commonjs while my files are literally using esm imports?
I usually use TypeScript for front-end development and never have I had to explicitly state the module of my source code.
I am asking because now I am not sure if it's intended behavior or if I am doing something wrong.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sorry more of a newbie question I guess but recently I've updated things into my computer and one of my project using
ts-node
stopped to work.After pushing some buttons and pulling some strings things got back to normal.
But now I have
"type": "module"
in mypackage.json
and I have to use
ts-node-esm
.Firstly, why do I need to use
ts-node-esm
because type module is explicitly stated intopackage.json
?But more importantly, why
ts-node
assume my project is commonjs while my files are literally using esm imports?I usually use TypeScript for front-end development and never have I had to explicitly state the module of my source code.
I am asking because now I am not sure if it's intended behavior or if I am doing something wrong.
Thanks for your support.
Beta Was this translation helpful? Give feedback.
All reactions