Skip to content Skip to sidebar Skip to footer

[NODEMON]- Babel-node Not Recognized As Internal Or External Command

I am trying to setup a simple express server. I am using nodemon to start my development server But my app keeps crashing because it does not recognize the 'babel-node' command. Th

Solution 1:

Remove your node_modules and follow these steps:

 npm install --save-dev @babel/core @babel/cli @babel/preset-env @babel/node

Then, check the existence of these files:

node_modules/.bin/babel-node

node_modules/.bin/babel-node.cmd - windows only

node_modules/@babel/node/bin/babel-node.js

If everything looks good add to package.json:

"start": "nodemon --exec babel-node index.js",

Solution 2:

None of the steps above work for me. I resorted to using yarn instead. Delete your package-lock.json Then do: yarn This will add the dependencies, then you can run it, most likely with yarn run dev (of course this depends on your scripts on package.json).


Solution 3:

I ran into the same problem and solved it this way:

"scripts": {
    "start": "babel-node src/index.js",
    "dev"  : "nodemon --exec npm start"
  }

In the terminal run

npm run dev

Post a Comment for "[NODEMON]- Babel-node Not Recognized As Internal Or External Command"