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
Cannot find module '@nrwl/webpack/package.json' #14531
Comments
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. |
Same here, I use 15.4.X works fine, updating to 15.5.X fail any Nx command with |
Yes, I have the same problem, I follow the instructions for version "nx": "15.5.3"
|
I hit this error as well, and for me the issue was that they removed the dependency from nrwl/web on nrwl/webpack, so I just explicitly specified the dependency and this stopped failing at least. |
There is a bug where |
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? |
Can you try installing the |
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 :( |
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. |
@vcardins totally agree. It's very disappointing. Is there anything I can do for you guys to help you tackle this down? |
Hi all! I am sorry you are disappointed in Nx. I will try to track down the source of this and provide a fix. @tamas-kasa can you give me steps on how to reproduce? The way I can reproduce this is to follow the tutorial, right? |
Linking this issue here: #14807 When I follow the tutorial to the letter, I get the error reported in the above issue. I don't get the webpack error. The error reported in the above issue is fixable if you create the file
Can you tell me how I can reproduce your issue? Which version of Nx did you start with? |
Yes, so basically I created the monorepo with Nx version 15.2.1 a long time ago. And I tried to migrate to 15.7.0. (I also tried to migrate to the next minor version step by step. but for now, let's focus on migrating straight to the latest version) nx --version
# 15.2.1 nx migrate latest npm install nx --version
# 15.7.0 nx migrate --run-migrations rm migrations.json nx run my-app:serve:development :( Cannot find module '@nrwl/webpack' |
Ok, I will try these steps in a minute, thanks! |
Ok @tamas-kasa thank you for the detailed reproduction steps. I finally managed to reproduce your issue. For me, just installing So, I will add now a migrator, that if a workspace is using Does this sound like a good solution? |
For anyone else running into this, you can manually install
in order to get all the other potential missing dependencies! |
@mandarini hmm, yes sounds good. interesting you didn't need to install the other packages. I used npm@8. Could it cause any troubles? |
Hmmm I am not sure to be honest. :( Sorry!! |
Anyways! Thank you so much for your help. 🙏 |
It didn't work for me, the commands I ran were:
|
Hey @vcardins ! When you tried that command, the commit fixing this issue was not in a release yet. Please can you manually install |
@mandarini I tried to migrate to 15.7.2 but it still doesn't work. Steps to reproduce: I'm on 15.2.1 and run:
then I run and then I'm still getting:
|
@tamas-kasa it's not in a release yet! Here is the commit. It's on 15.8.0-beta! :) To get unblocked, you may manually install the missing dependencies for now! |
Ah I see. I thought it was released with 15.7.2, sorry. |
I was having the same issues after trying to migrate to 15.7.2... so upgraded to 15.8.0-beta.8 ... and it literally broke everything WARNING in ../../node_modules/sax/lib/sax.js 163:13-37 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/core-http/dist/index.js 12:9-22 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/core-http/dist/index.js 13:11-26 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/core-http/dist/index.js 14:12-28 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/core-http/dist/index.js 17:13-30 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/core-util/dist/index.js 6:13-30 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/logger/dist/index.js 8:9-22 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/storage-blob/dist/index.js 11:13-30 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/@azure/storage-blob/dist/index.js 12:13-30 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/tunnel/lib/tunnel.js 3:10-24 ERROR in ../../node_modules/tunnel/lib/tunnel.js 4:10-24 ERROR in ../../node_modules/tunnel/lib/tunnel.js 5:11-26 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/tunnel/lib/tunnel.js 6:12-28 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: ERROR in ../../node_modules/xml2js/lib/parser.js 17:17-47 BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. If you want to include a polyfill, you need to: webpack compiled with 13 errors and 1 warning (dbe14ed8a0b43cb3) |
@72gm I am sorry that happened to you! Can you please send me a reproduction repository so that I can help? Also, this looks like a different issue. Do you mind opening a new bug report? Thank you for reporting it!! |
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 :) |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Followed the nx dev tutorial TO THE LETTER :-)
https://nx.dev/react-tutorial
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 :-)
https://nx.dev/react-tutorial
Nx Report
Failure Logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: