-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodemon restart process looks for tempfile.js~ and throws an error. #2215
Labels
stale
no activity for 2 weeks
Comments
theTutorB
changed the title
Nodemon
Nodemon restart process looks for tempfile.js~ and throws an error.
Aug 13, 2024
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"start": "./node_modules/.bin/nodemon --config nodemon.json --exec ./node_modules/.bin/babel-node src/server.js",
Expected behaviour
When nodemon detects a change in the codebase under watch, it should reload the file that the changes occurred on, and restart the process without issue, with all changes that don't throw errors to load and restart the server application as expected.
Actual behaviour
filename.js~
and not the actual filefilename.js
.Steps to reproduce
please see attached
any and all support is greatly appreciated!
additional info:
When I run our api locally with npm run start this script gets called:
"start": "./node_modules/.bin/nodemon --config nodemon.json --exec ./node_modules/.bin/babel-node src/server.js",
so far all of this worked just fine without issue, beautiful dev experience... then somewhere I broke it with an update to nodemon i'm sure.
And now whenever I make a change to any file being watched (i.e. I set it to filename.js~ in this case) that nodemon picks up on and attempts to restart the process I get an error every single time...
{
"errno": -2,
"code": "ENOENT",
"syscall": "stat",
"path": "/absolute/path/to/project/filename.js~"
"stack": "Error: ENOENT: no such file or directory, stat '/absolute/path/to/project/filename.js~'"
"message": "ENOENT: no such file or directory, stat '/absolute/path/to/project/filename.js~'"
}
From the research I have been doing it seems like the ENOENT error is occurring because nodemon is trying to watch a backup file (e.g., filename.js~) that does not exist.
I tried updating the nodemon.json config file as well, see below:
{
"ignore": [
"node_modules/",
".test.js",
"dist/",
"seed/",
"reports/",
"logs/",
"swagger.json",
"**/.js~"
],
"watch": ["src/"],
"verbose": true
}
Not sure how to resolve this issue, and have been dealing with it for a while, but have not been able to figure out what exactly is going on with my timeboxed troubleshooting approach. So hopefully I can get some feedback from the community!
If applicable, please append the
--dump
flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.The text was updated successfully, but these errors were encountered: