-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Error: The externalDependency 'webpack-cli' for 'server:build' could not be found #22871
Comments
Update: it happens when I use |
One solution for now: |
I was facing the same thing with "storybook". The externalDependency 'storybook' for '<package-name>:build-storybook' could not be found Downgrading |
Saw the same issues with It would appear NX and pnpm@9 are not friends yet. |
i'm using npm and I'm getting the same error. |
I was having the same issue using npm. I ran the commands below and it seems to have resolved everything. I'm not sure that all three are required, but I know it resolved my issue after running them all. nx reset
npm update
npm audit fix |
This works, don't forget to delete lock file and reinstall packages |
Nx doesn't support pnpm 9 yet. Support for that is currently being tracked in #22850. I'm going to close this as a duplicate. |
Downgrading pnpm didn't work for me. |
@AgentEnder Can you please reopen this? |
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
NX started to fail when I try to serve or build my NestJS app. It gives this error if Itry to do so:
Error: The externalDependency 'webpack-cli' for 'server:build' could not be found
.This was happening to my existing project. But I also tried it on a fresh NX install and it behaved the same way.
Expected Behavior
I expect a server to build and/or serve my NestJS app as normal.
GitHub Repo
No response
Steps to Reproduce
You install a fresh and clear nx workspace with NestJS project in it.
You try to run or build your nest application:
You get this error:
The logfile has this:
Nx Report
The text was updated successfully, but these errors were encountered: