Error: Cannot find module 'babel-register' Error: Cannot find module 'babel-register' express express

Error: Cannot find module 'babel-register'


I have resolved this issue myself, it was actually an issue with package-lock file being out of sync with the package file. I deleted the package-lock file and npm installed. This then allowed my project to run correctly.


in my case my script had an error:

"scripts": {    "test": "echo \"Error: no test specified\" && exit 1",    "start": "node --require 'babel-register' src/index.js"  }

I had to edit my script by removing quotes in babel-register, the correct statement was:

"scripts": {    "test": "echo \"Error: no test specified\" && exit 1",    "start": "node --require babel-register src/index.js"  }


In my case I did not have a devDependency to babel-cli. Adding it made everything work fine