nx: Cannot find module '@nrwl/webpack/package.json'
Current Behavior
Followed the nx dev tutorial TO THE LETTER 😃
When I get to the “npx nx build admin” or “npx nx serve admin” steps I get an error:
Unable to resolve @nrwl/webpack:webpack for build
Unable to resolve @nrwl/webpack:dev-server for serve
I can fix the issue by adding “@nrwl/webpack”: “^15.5.2” to devDependencies in package.json (and running npm install)
I assume this is a correct fix? Meanwhile, is the tutorial broken?
Expected tutorial to work without additional steps, unsure if this is a documentation issue, or a bug?
Expected Behavior
Expected demo / tutorial to work without adding additional dependecies
Github Repo
No response
Steps to Reproduce
Followed the nx dev tutorial TO THE LETTER 😃
Nx Report
Unable to resolve @nrwl/webpack:dev-server
Or
Unable to resolve @nrwl/webpack:webpack
Failure Logs
No response
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 29 (12 by maintainers)
For anyone else running into this, you can manually install
@nrwl/webpackand then you can run:in order to get all the other potential missing dependencies!
I’m a big fan and long time user of NX, but this issue has been around for a long time. I tried to migrate to 15.7.1 today and the same error (since 15.0.0). I think it should be really considered before releasing any next version.
Yes I tried (however I was promised it’s not needed anymore)
But then I get the following error:
Once I install react-refresh, I get the following error:
Once I install the aforementioned module, I get the following:
Once I install that one too, everything is alright
Please don’t tell me this is the expected process 😦
Seems like 15.4.5 was last version OK, then I had. Went from 15.4.5 to 15.8.5 and getting:
Solved with
PS: Cannot say if rm -rf part was important but its running 😃
Ah I see. I thought it was released with 15.7.2, sorry.
Anyways! Thank you so much for your help. 🙏
@mandarini hmm, yes sounds good. interesting you didn’t need to install the other packages. I used npm@8. Could it cause any troubles?
Hi,
I’m still getting the error @nrwl/webpack not found however I use nx 15.7.0 to migrate
how can I get rid if this error message when I run serve:development?
There is a bug where
create-nx-workspacedoes not install@nrwl/webpack. This will be patched in the next release. For now the workaround is to install@nrwl/webpackmanually.Yes, I have the same problem, I follow the instructions for version “nx”: “15.5.3” gives an error message:
This is a bug in 15.5.2…
When I follow the tutorial with 15.4.5 I don’t get this error and no need to manually adjust dependencies.