There could be several reasons for this. Here are some possible causes:
Nodemon is not installed inside the Docker container: Check if Nodemon is installed correctly inside the Docker container. If not, then install it using the command npm install -g nodemon
.
Nodemon is not watching files: Check if Nodemon is watching the correct files. If not, then add the correct files or directories that Nodemon should be watching. You can do this by adding the --watch
flag followed by the file or directory path.
Nodemon is not listening for changes: Check if Nodemon is listening for file changes. If not, then add the --exec
flag followed by the command that should be executed when a file changes. For example, if you want to run node server.js
when a file changes, then add the command nodemon --watch . --exec "node server.js"
.
Nodemon is not running in the foreground: Check if Nodemon is running in the foreground. If not, then add the -L
flag to force Nodemon to run in the foreground.
Docker volume permissions: If you are using volumes to sync your local files to the Docker container, then the permissions on those files can cause issues. Make sure the ownership and permissions are set correctly on the files inside the container.
Docker container settings: Check if the Docker container settings are allowing Nodemon to restart. If the container is set to restart always, then Nodemon should restart after file changes. If not, then change the container settings to restart always.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-01-05 11:00:00 +0000
Seen: 16 times
Last updated: Nov 18 '22
How can unstaged work be resolved in two working directories using Git?
How can you retrieve lost uncommitted changes using "git reset --hard"?
How can notifications for changes in nested properties of a Realm object be implemented?
What changes need to be made to this for loop to be suitable for use with Pandas, Modin, or Ray?
What changes do I need to make in the netcat command line to send multiple requests simultaneously?