In trying out nx.dev, I ran this command
npx nx generate @nrwl/node:app ghApi
and received this error
Unable to resolve @nrwl/node:app.
Cannot find module '@nrwl/node/package.json'
Require stack:
- /Users/dean/workspace/gazehealth/nxdev-workspace/node_modules/nx/src/utils/nx-plugin.js
- /Users/dean/workspace/gazehealth/nxdev- workspace/node_modules/nx/src/config/workspaces.js
- /Users/dean/workspace/gazehealth/nxdev-workspace/node_modules/nx/src/command- line/generate.js
- /Users/dean/workspace/gazehealth/nxdev-workspace/node_modules/nx/src/command-line/nx-commands.js
- /Users/dean/workspace/gazehealth/nxdev-workspace/node_modules/nx/bin/init-local.js
- /Users/dean/workspace/gazehealth/nxdev-workspace/node_modules/nx/bin/nx.js
I simply followed instructions from https://nx.dev/getting-started/nx-and-typescript any ideas?
I had a similar issue.
Try:
nx report
You will see something like this:
In my case
@nrwl/node
was "not found"So I just Installed it with:
npm i @nrwl/node
And after that, the
nx g @nrwl/node:app MyAppName
worked.I hope this can help!