Skip to content
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

NestJS doesen't restart when I modify scripts in the packages folder #9

Open
kisstamasj opened this issue Oct 22, 2023 · 1 comment

Comments

@kisstamasj
Copy link

kisstamasj commented Oct 22, 2023

Hello,
I made a similar project like yours and I have an issue with what I mentioned in the title of that issue. My tsconfigs are the same like yours. I made a simple common package into the packages folder, and I installed like it should be when work with workspaces. In the NextJS project it works well, so when I make modification in that common package the NextJS detect it and restart the application, but the NestJS doesent detect it, I have to restart manually, and it is very inconvenient. In that common package also there is a dev script in the package json, so when I run turbo run dev, the ts files are transpiled into js file automatically, and also it watching the changes.
So I don't know why is happenning, maybe you know what is the solution. I hope I explaind understandable.

I link my repo, so you can check it: https://github.com/kisstamasj/nextjs-nestjs-pnpm
After clone the repo, you sould switch to the turbo_test branch

You don't have to do anything with the infra folder, except you have to copy the env.example, but I still just testing without docker and db.
I would pretiate your help.
Have a nice day/evening.

@tetraf0ur
Copy link

tetraf0ur commented Dec 16, 2023

i replace(apps/api/package.json):

"dev": "nest build --webpack --webpackPath webpack-hmr.config.js --watch",

with:

"dev": "nest start --watch",

and it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants