nx
nx copied to clipboard
Set Up Application Proxies Fail - NX Cannot find module 'nx/src/plugins/package-json-workspaces'
Documentation issue
- [ ] Reporting a typo
- [x] Reporting a documentation bug
- [ ] Documentation improvement
- [x] Documentation feedback
Is there a specific documentation page you are reporting?
Enter the URL or documentation section here.
Additional context or description
I started a new react + next project and chose the nest.js as the backend service. Then I try to connect them through setting up application proxies. Here are the commands in the docs:
nx g @nx/node:app <node-app> --frontendProject my-react-app
nx g @nx/nest:app <nest-app> --frontendProject my-react-app
nx g @nx/express:app <express-app> --frontendProject my-react-app
I ran 'nx g @nx/nest:app
NX Cannot find module 'nx/src/plugins/package-json-workspaces'
I'm not sure which step I did is wrong. Thanks. Node version is v21.1.0.
By the way, Node version is v21.1.0. Thanks!
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! ๐
I have this error too. In start, react-native metro server
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! ๐
Well this is frustrating. I am getting this same error and have no clue what to do about it.
using npx nx g @nx/node:application <app name> --dry-run
Was able to fix it locally for me by editing node_modules/@nx/jest/src/plugins/plugin.js
line 12 to be:
const package_json_workspaces_1 = require("nx/plugins/package-json-workspaces");
definitely a hacky solution, though.
it appears @nx/jest
is looking in the wrong directory for package-json-workspaces
since it does not appear to be located at nx/src/plugins
but instead at just nx/plugins
Still happening
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! ๐
going to comment here to keep this issue from auto-closing.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! ๐
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.