Skip to content
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

Cannot find module '@nrwl/workspace/src/utilities/perf-logging' #9769

Closed
patrick1729 opened this issue Apr 9, 2022 · 4 comments
Closed

Cannot find module '@nrwl/workspace/src/utilities/perf-logging' #9769

patrick1729 opened this issue Apr 9, 2022 · 4 comments

Comments

@patrick1729
Copy link

Current Behavior

I am trying to add a service worker in my Angular application with the command:
ng add @angular/pwa --project *project-name*
keep getting error:
Cannot find module '@nrwl/workspace/src/utilities/perf-logging'

My global Nx version is the same as project version 13.10.1.
I referred similar issues:

Expected Behavior

The service worker should be created without errors

Failure Logs

Unknown error: Error: Cannot find module '@nrwl/workspace/src/utilities/perf-logging'
Require stack:
- D:\whatsapp-clone\node_modules\@nrwl\cli\lib\init-local.js
- D:\whatsapp-clone\node_modules\@nrwl\cli\bin\nx.js
- D:\whatsapp-clone\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\DELL\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js

Environment

   Node : 14.16.0
   OS   : win32 x64
   npm  : 6.14.11

   nx : 13.10.1
   @nrwl/angular : 13.10.1
   @nrwl/cypress : 13.10.1
   @nrwl/detox : Not Found
   @nrwl/devkit : 13.10.1
   @nrwl/eslint-plugin-nx : 13.10.1
   @nrwl/express : Not Found
   @nrwl/jest : 13.10.1
   @nrwl/js : 13.10.1
   @nrwl/linter : 13.10.1
   @nrwl/nest : 13.10.1
   @nrwl/next : Not Found
   @nrwl/node : 13.10.1
   @nrwl/nx-cloud : 13.2.2
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 13.10.1
   @nrwl/web : Not Found
   @nrwl/workspace : 13.10.1
   typescript : 4.6.3
   rxjs : 7.5.5
@AgentEnder
Copy link
Member

Looking at the require stack in your error log, it looks like its trying to load Nx through @nrwl/cli which no longer exists. Its possible the decorate angular cli file in your repo has become out of date.

In any case, can you run npm i @angular/pwa && nx g @angular/pwa:ng-add instead? It should work.

@AgentEnder AgentEnder added the scope: angular Issues related to Angular support in Nx label Apr 12, 2022
@leosvelperez
Copy link
Member

Could you share a repo where this issue can be reproduced?

@github-actions
Copy link

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! 🙏

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants