ESM struggle
See original GitHub issueHi, in my package.json
I have two scripts, my start
script is working, but dev
using node-dev
isn’t
{
"scripts": {
"dev": "node-dev --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only src/index.ts",
"start": "node --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only src/index.ts",
},
//...
}
I’m trying to work with ESM, because I need top level await
This is the error:
[ERROR] 19:34:14 RangeError: Unknown module format: null for URL file:///path_to_project/src/index.ts
Issue Analytics
- State:
- Created a year ago
- Reactions:8
- Comments:5
Top Results From Across the Web
Why ESM fails: 7 sure-fire ways to kill your project - Micro Focus
Here are the key issues experts have seen derail ESM projects in ... and making too many assumptions, people will struggle to automate...
Read more >ESM debut may struggle to repeat history | Reuters
With the ESM's improved structure, the joint EFSF/ESM management is confident that even more investors will be able to buy the permanent replacement....
Read more >Home | ESM
We will provide tailored stress elimination solutions to create awareness, monitor stress levels, and combat short and long term negative impacts of stress ......
Read more >This post saved me from my 2 week struggle with ESM. THANK YOU ...
This post saved me from my 2 week struggle with ESM. THANK YOU! It's a great hotfix. ... DEV Community ...
Read more >History | European Stability Mechanism
Read online version of the ESM history book “Safeguarding the Euro in Times ... of the ESM" The context Euro zone debt crisis...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Recommending using
tsx watch
here.It’s like
node-dev
in that also only watches files that are imported, but it also supports native ESM.@privatenumber thank you for mentioning this package! That really helped