-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
New Workspace + add Angular = Could not find module "@nrwl/workspace" #1499
Comments
same problem, when running I updated from |
It looks like an older version of Nx was used. Please use You only need to add |
@FrozenPandaz , thanks very much. That worked a treat. I'll use that for now. Technically however, this is still a bug - as all your docs don't mention |
hey @FrozenPandaz i tried the command you mentioned. I still get the same error. |
This keeps haunting me. I've created a brand new workspace with the latest nx as far as I know and I keep getting this error. Is there any fix? |
@tdekoekkoek will you provide some more information about your environment? Such as:
|
having same issue as @ph55 |
I have the same issue I can't create a new workspace neither npm init nx-workspace@latest nor npx create-nx-workspace. I am running from a windows machine and the latest node version 12.7.0 |
Found workaround: |
If you are trying to create work-space
|
Thanks to @FrozenPandaz for the temporary advice:
As of Nrwl Nx version 8.5 this is no longer an issue. Now works just fine. Closing issue... |
For me, install nx cli globally works. |
I have still this error.
source: https://nx.dev/web/guides/cli After that I try whats @vsavkin write:
Because I want a app with protractor. After last command I get the error:
I tried it also with:
-> empty workspace and after that the ng g add command, but with same result. My System infos:
rough start ;-) Update:
|
Only if I install @nrwl/workspace locally, then it works. It's right? Why @nrwl/workspace not appear in docs? |
Similar error here, the applications run but I cant create any library
|
I'm having the same issue as @duard
EDIT: Running |
@michael-golden I'm using Nx with Angular, and I fixed it doing :
|
|
@gqchishti |
Reviving the same error! 👎 [error] Error: Could not find module "@nrwl/workspace" from ".../x-workspace".
at Object.resolve (/home/x/node_modules/@angular-devkit/core/node/resolve.js:154:11)
at NodeModulesEngineHost._resolvePackageJson (/home/x/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:28:21)
at NodeModulesEngineHost._resolveCollectionPath (/home/x/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js:69:40)
at NodeModulesEngineHost.createCollectionDescription (/home/x/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:115:27)
at SchematicEngine._createCollectionDescription (/home/x/node_modules/@angular-devkit/schematics/src/engine/engine.js:147:40)
at SchematicEngine.createCollection (/home/x/node_modules/@angular-devkit/schematics/src/engine/engine.js:140:43)
at NewCommand.getCollection (/home/x/node_modules/@angular/cli/models/schematic-command.js:128:35)
at NewCommand.initialize (/home/x/node_modules/@angular/cli/models/schematic-command.js:44:37)
at async NewCommand.validateAndRun (/home/x/node_modules/@angular/cli/models/command.js:124:9)
at async Object.runCommand (/home/x/node_modules/@angular/cli/models/command-runner.js:186:24) |
I had the same issue. After removing a rogue package.json, package-lock and node_modules that contained an older version of @nrwl/workspace folder in a parent directory, of my current working directory, the command worked as expected. sorry I don't have the exact details...as I cleaned up the files were gone. |
This helped me move forward. Then I got another error saying module 'typescript' was not found. Did "npm i -g typescript" then tried "npx create-nx-workspace myworkspace" again and this time it worked! Thnx alot :) |
I happened to come across this project today and it looked like a fantastic way to speed up my builds. I got the same errors as many others are describing though. Running
After starting to dig deeper it seems that maybe the onboarding for https://nx.app/orgs assumes that you've already got a bunch of other things in play. I didn't have any of those though so would be great to have a few more cues on where to start. Looking forward to the chance to actually use this as the videos look super promising. |
|
Finally, I've managed to generate a project with Karma runner this way:
|
I have managed to resolve this issue by |
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. |
Expected Behavior
Creating new workspace via npm, add Angular tooling, and generate Angular app should use latest version and not crash.
This relates to ticket #1497, but is not the same
Current Behavior
Crashes at end of
ng add @nrwl/angular
Failure Information
...error received during
ng add @nrwl/angular
install:Steps to Reproduce
npm init nx-workspace myworkspace
ng add @nrwl/angular
Context
relevant information about my setup:
npm init nx-workspace myworkspace
- 7.6.2The text was updated successfully, but these errors were encountered: