nodemon --exec causes an app crash on Windows with Node v15.15.1
See original GitHub issueHappy new year all! I recently upgraded node to version 15.5.1 from 14.15.3. Now when I start my app using the following script. I get an error.
"scripts": {
"start": "nodemon --exec babel-node src/index.js"
},
Here are the dependencies I have:
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/node": "^7.12.10",
"nodemon": "^2.0.6"
nodemon -v: 2.0.6node -v: 15.5.1- Operating system/terminal environment: Windows Powershell
- Command you ran:
nodemon --exec babel-node src/index.js
Expected behaviour
The app should start. This works on node version 14.15.3 using a windows computer.
Actual behaviour
The following error occurs:
[nodemon] starting `babel-node src/index.js`
'babel-node' is not recognized as an internal or external command, operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...
Note: I tested this out on my macOS computer, no error occurs, even on node version 15.5.1, so, this seems to be a windows error.
Thanks you for your help!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
nodemon app crashed - waiting for file changes before starting
FOR Windows 1. Go to the task manager 2. Then look for Node.js: Server-side JavaScript 3. Then right click on it and End...
Read more >NODEMON — app crashed — waiting for file changes before ...
Reasons & Solutions: First: Maybe your PC running several processes in the Background. So you need to stop all the node process that...
Read more >Node.js 10.x < 10.23.1 / 12.x < 12.20.1 / 14.x < - Vulners
This function behaves incorrectly when both GENERAL_NAMEs contain an EDIPARTYNAME. A NULL pointer dereference and a crash may occur leading to a ...
Read more >pinentry bug fix and enhancement ... - Oracle Linux Yum Server
[4.2.6p5-28] - fix buffer overflow in datum refclock driver (CVE-2017-6462) - fix crash with invalid unpeer command (CVE-2017-6463) - fix potential crash ......
Read more >Nodemon exec - Littleleaftoys.shop
nodemon can also be used to execute and monitor other programs. nodemon ... nodemon --exec causes an app crash on Windows with Node...
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 Free
Top 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

Hi @remy and @danny007in I modified my command to the following and it worked:
On windows machines, it seems you have to specify the absolute path to babel-node to get it working.
I got this solution from here https://stackoverflow.com/a/65859915
This comes up if you’re using Windows in the React: Zero to Full Stack lesson 9.6 on O’Reilly’s learning. I’m getting the same error with the same line. Removing “npx” and using the full path, as wes said above, I’m confirmed is working. I just did it. You may find a bunch of people going here due to that material on the Safari Books/OReilly media. This info should help future people with similar issues