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

Error: Cannot find module '@nrwl/workspace/src/utils/perf-logging' #4656

Closed
udayvunnam opened this issue Jan 31, 2021 · 17 comments
Closed

Error: Cannot find module '@nrwl/workspace/src/utils/perf-logging' #4656

udayvunnam opened this issue Jan 31, 2021 · 17 comments

Comments

@udayvunnam
Copy link
Contributor

I have tried to migrate to the latest nx version but getting error as Cannot find module '@nrwl/workspace/src/utils/perf-logging'

It seems that @nrwl/workspace/src/utils/perf-logging is required at

require('@nrwl/workspace/' + 'src/utilities/perf-logging');

When we actually look at https://github.com/nrwl/nx/tree/master/packages/workspace/src/utils there is no such file perf-logging.ts

Can you please check

"@nrwl/workspace": "11.2.6",
"@nrwl/angular": "11.2.6",

@iztokb
Copy link

iztokb commented Feb 1, 2021

Yup, same issue here.
"@nrwl/workspace": "11.2.6"
""@nrwl/angular": "11.2.6"

@mandarini
Copy link
Member

Hello there @udayvunnam and @iztokb ! Can you please try changing @nrwl/workspace/src/utils/perf-logging to @nrwl/workspace/src/utilities/perf-logging and let me know if this fixes your issue?

@mandarini mandarini self-assigned this Feb 1, 2021
@vsavkin vsavkin added blocked: repro needed scope: core core nx functionality labels Feb 1, 2021
@vsavkin
Copy link
Member

vsavkin commented Feb 1, 2021

@udayvunnam thank you for submitting the issue. Could you provide a repo with a repro?

I think your @nrwl/cli might be out of sync with the rest of the packages.

@vsavkin vsavkin self-assigned this Feb 1, 2021
@udayvunnam
Copy link
Contributor Author

@vsavkin below are the details

git clone https://github.com/udayvunnam/xng-breadcrumb.git
git checkout feat/nx-upgrade
yarn install
yarn start

_yarn start_ gives the error

Error: Cannot find module '@nrwl/workspace/src/utils/perf-logging'
Require stack:

  • /Users/u0v000i/Desktop/code/temp/xng-breadcrumb/node_modules/@nrwl/cli/lib/init-local.js

Reference PR - udayvunnam/xng-breadcrumb#73

@udayvunnam
Copy link
Contributor Author

I tried to upgrade via nx migrate latest

@mandarini
Copy link
Member

I cloned your repo, and I observed that your version of @nrwl/cli is indeed out of sync with the rest of the packages "@nrwl/cli": "10.3.0".

So, you can try running yarn add -D @nrwl/cli and then you will be able to start your server.

@udayvunnam
Copy link
Contributor Author

Thank you @mandarini. That works!

Shouldn't nx migrate latest upgrade @nrwl/cli version too?

@udayvunnam
Copy link
Contributor Author

@vsavkin @mandarini Thanks a ton for building nx. My work and personal projects have been much productive with it.

@mandarini
Copy link
Member

Thank you @udayvunnam for the kind words! :)

@kevinbeal
Copy link

Shouldn't nx migrate latest upgrade @nrwl/cli version too?

It did for me when I tried it just now.

@val-samonte
Copy link

just commenting to confirm that this happens to me as well. for anyone who will encounter this in the future, just check the @nrwl/cli inside package.json and make sure it has the same version as the rest of @nrwl packages

@Sikora00
Copy link

Sikora00 commented Feb 13, 2021

For me too. @nrwl/cli was not upgraded with the rest of the packages.

@andyjessop
Copy link

For me too, but changing it manually gives more errors:

npm ERR! While resolving: web@0.0.0
npm ERR! Found: @nrwl/eslint-plugin-nx@13.9.5
npm ERR! node_modules/@nrwl/eslint-plugin-nx
npm ERR!   dev @nrwl/eslint-plugin-nx@"14.1.7" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @nrwl/eslint-plugin-nx@"14.1.7" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @typescript-eslint/parser@5.18.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"~5.18.0" from @nrwl/eslint-plugin-nx@14.1.7
npm ERR!   node_modules/@nrwl/eslint-plugin-nx
npm ERR!     dev @nrwl/eslint-plugin-nx@"14.1.7" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/andy/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andy/.npm/_logs/2022-05-19T14_44_00_661Z-debug.log

@nhhockeyplayer
Copy link

nhhockeyplayer commented Jun 8, 2022

My migrations went fine cli updated to latest

This is causing all my projects to fail any build commands. No solution as of yet.

meanstack02@admin starter % nx build shared-sass

> nx run shared-sass:build:production

Cannot find module 'nx/src/utils/app-root'
Require stack:
- /Users/meanstack02/new/starter/node_modules/@nrwl/devkit/index.js
- /Users/meanstack02/new/starter/node_modules/@nrwl/angular/src/executors/package/package.impl.js
- /Users/meanstack02/new/starter/node_modules/@nrwl/workspace/node_modules/nx/src/config/workspaces.js
- /Users/meanstack02/new/starter/node_modules/@nrwl/workspace/node_modules/nx/src/command-line/run.js
- /Users/meanstack02/new/starter/node_modules/@nrwl/workspace/node_modules/nx/bin/run-executor.js

 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build for project shared-sass (491ms)
 
    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]
 
   See Nx Cloud run details at https://nx.app/runs/Mt188xupcey

@parisholley
Copy link

@nhhockeyplayer i ran into this trying to use latest versions of everything and "@nrwl/remix": "14.1.7". the problem is that devkit is out of date in dependencies and you need to explicitly put latest in your package.json: "@nrwl/devkit": "14.2.4"

@polpenaloza
Copy link

Indeed, look for the rest of the @nrwl/ packages

@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