Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Script in "Watching file changes with nodemon" doesn't work #53

Closed
wenheqi opened this issue Jun 9, 2020 · 3 comments
Closed

Script in "Watching file changes with nodemon" doesn't work #53

wenheqi opened this issue Jun 9, 2020 · 3 comments

Comments

@wenheqi
Copy link

wenheqi commented Jun 9, 2020

Please correct me if I interpret the section "Watching file changes with nodemon" wrong.

What I found in this section is that after issue npm start, the project won't rebuild when index.js is modified, i.e. when I modified the greetings, it was not updated when I refresh the page. The script seems only to build the project once when the command is issued.

Following script works for me:

"start": "nodemon --exec \"npm run build && node dist/index.js\" -e js --ignore dist/"
@cunneen
Copy link

cunneen commented Jun 12, 2020

Thank you for posting this @wenheqi your solution worked for me.

@koistya
Copy link

koistya commented Sep 6, 2020

@MacgyverMartins
Copy link

Please correct me if I interpret the section "Watching file changes with nodemon" wrong.

What I found in this section is that after issue npm start, the project won't rebuild when index.js is modified, i.e. when I modified the greetings, it was not updated when I refresh the page. The script seems only to build the project once when the command is issued.

Following script works for me:

"start": "nodemon --exec \"npm run build && node dist/index.js\" -e js --ignore dist/"

Thanks!!

MacgyverMartins added a commit to MacgyverMartins/example-node-server that referenced this issue Sep 16, 2020
@wenheqi wenheqi closed this as completed Oct 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants