I have this script which works well
"start": "nodemon -x node -r dotenv/config src/index.js"
I want use babel-node instead node. So there is the new script:
"start": "nodemon -x babel-node --presets=env -r dotenv/config -- src/index.js"
But I get this error
[nodemon] starting `babel-node --presets=env -r dotenv/config src/index.js`
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'pathTo/dotenv/config'
Can you help ?