'nodemon not restarting froze at "[nodemon] restarting due to changes..."
im having this issue, currenly im developing a express.js app with babel and nodemon. but resenly when i try to restart the server, it froze at [nodemon] restarting due to changes... and dosent restart. the command im using is npm run dev for develop. i tried every single solution "change to nodemon 2.0.7", "npm clean cache --force", "install @babel/cli, @babel/node, etc", "uninstall nodemon and then install it" and nothing work
Im using Windows 10 and .env files
Console
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `npx babel-node src/index.js`
Server listen on port 4000
Db is connected
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
package.json
{
"name": "scrap-api",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "babel src --out-dir build",
"dev": "nodemon --exec npx babel-node src/index.js",
"start": "node build/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"babel-cli": "^6.26.0",
"bcryptjs": "^2.4.3",
"core-js": "^3.22.5",
"cors": "^2.8.5",
"dotenv": "^16.0.0",
"express": "^4.17.3",
"helmet": "^5.0.2",
"jsonwebtoken": "^8.5.1",
"morgan": "^1.10.0",
"nodemon": "^2.0.7",
"pg": "^8.7.3",
"regenerator-runtime": "^0.13.9"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/node": "^7.17.10",
"@babel/plugin-transform-runtime": "^7.17.10",
"@babel/preset-env": "^7.16.11",
"babel-plugin-transform-runtime": "^6.23.0"
}
}
.babelsrc file
{
"presets": [
"@babel/preset-env"
],
"plugins": ["@babel/transform-runtime"]
}
right now is very frustrating because i have to stop the server and run it over and over again.
any sugestion apart of the mentioned, are welcome ):
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|