Cannot find module '@nrwl/webpack/package.json'

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

1

1 Answer

Looks like this is a bug in V 15.5.2!

When I repeat the tutorial steps using V 15.4.5 (npx [email protected]) the problem goes away.

Bug reported to nrwl team.

Just in case, this helps solve a problem for other developers...

Images are also broken in V 15.5.2 (and 15.5.3)! Basically images DO NOT DISPLAY...

import siteLogo from "./assets/images/modules/logo.png";
<img src={siteLogo} width="137px" height="47px" alt="Yamaha | Revs Your Heart" />

Reverting to 15.4.5 also fixes this issue!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like