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' #9354

Closed
the-prateek-mishra opened this issue Mar 16, 2022 · 4 comments
Closed

Comments

@the-prateek-mishra
Copy link

the-prateek-mishra commented Mar 16, 2022

Current Behavior

I am trying to migrate my workspace using command nx migrate latest but constantly getting the error:
Cannot find module '@nrwl/workspace/src/utilities/perf-logging'.
I am using:

  • "@nrwl/angular": "12.9.0",
  • "@nrwl/cli": "12.9.0",
  • "@nrwl/eslint-plugin-nx": "12.9.0",
  • "@nrwl/linter": "12.9.0",
  • "@nrwl/workspace": "12.9.0",
  • "@nrwl/nx-cloud": "12.5.4"

My global Nx version is the same as project version 12.9.0. I referred a similar issue #4656 and none of the comments helped as all of my @nrwl/* dependencies are of same version.

Expected Behavior

The migration should work properly.

Failure Logs

When running nx migrate latest:

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

  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2126-xPdog9UyyocO/node_modules/nx/src/cli/init-local.js
  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2126-xPdog9UyyocO/node_modules/nx/bin/nx.js
  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2126-xPdog9UyyocO/node_modules/@nrwl/tao/index.js
    /Users/Desktop/myProject/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1132
    throw err;
    ^

Error: Command failed: /var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2126-xPdog9UyyocO/node_modules/.bin/tao migrate latest
at checkExecSyncError (child_process.js:643:11)
at Object.execSync (child_process.js:679:15)
at Object.handler (/Users/Desktop/myProject/node_modules/@nrwl/workspace/src/command-line/nx-commands.js:97:25)
at Object.runCommand (/Users/Desktop/myProject/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/command.js:196:48)
at Object.parseArgs [as _parseArgs] (/Users/Desktop/myProject/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:1043:55)
at Object.get [as argv] (/Users/Desktop/myProject/node_modules/@nrwl/workspace/node_modules/yargs/build/lib/yargs.js:986:25)
at Object.initLocal (/Users/Desktop/myProject/node_modules/@nrwl/cli/lib/init-local.js:25:79)
at Object. (/Users/Desktop/myProject/node_modules/@nrwl/cli/bin/nx.js:43:18)
at Module._compile (/usr/local/lib/node_modules/nx/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 2145,
stdout: null,
stderr: null
}

When running npx nx migrate latest:

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

  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2279-Y6xmi1jUjN49/node_modules/nx/src/cli/init-local.js
  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2279-Y6xmi1jUjN49/node_modules/nx/bin/nx.js
  • /private/var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2279-Y6xmi1jUjN49/node_modules/@nrwl/tao/index.js
    Command failed: /var/folders/_h/q2flkpjd2w1_dgbtf03dvhqh0000gn/T/tmp-2279-Y6xmi1jUjN49/node_modules/.bin/tao migrate latest

Environment

Node : 14.17.2
OS : darwin x64
npm : 6.14.13

nx : Not Found
@nrwl/angular : 12.9.0
@nrwl/cli : 12.9.0
@nrwl/cypress : 12.9.0
@nrwl/devkit : 12.9.0
@nrwl/eslint-plugin-nx : 12.9.0
@nrwl/express : Not Found
@nrwl/jest : 12.9.0
@nrwl/linter : 12.9.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 12.5.4
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.9.0
@nrwl/web : Not Found
@nrwl/workspace : 12.9.0
@nrwl/storybook : 12.9.0
@nrwl/gatsby : Not Found
typescript : 4.3.5

@kleinMaggus
Copy link

Same issue here:

Node : 14.18.2
OS : win32 x64
npm : 7.20.1

nx : Not Found
@nrwl/angular : Not Found
@nrwl/cli : 12.6.3
@nrwl/cypress : 12.6.3
@nrwl/devkit : 12.6.3
@nrwl/eslint-plugin-nx : 12.6.3
@nrwl/express : 12.6.3
@nrwl/jest : 12.6.3
@nrwl/linter : 12.6.3
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 12.6.3
@nrwl/nx-cloud : Not Found
@nrwl/react : 12.6.3
@nrwl/schematics : Not Found
@nrwl/tao : 12.6.3
@nrwl/web : 12.6.3
@nrwl/workspace : 12.6.3
@nrwl/storybook : 12.6.3
@nrwl/gatsby : Not Found
typescript : 4.3.5

@FrozenPandaz
Copy link
Collaborator

Sorry about that folks.

Fixed with #9352

The fix is published.

@the-prateek-mishra
Copy link
Author

@FrozenPandaz the above issue is resolved for command nx migrate. However, while using jest-project I am again receiving the same error.
Command: nx g @nrwl/jest:jest-project --project=<project-name>
Error:

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

  • /Users/Desktop/myProject/node_modules/nx/src/cli/init-local.js
  • /Users/Desktop/myProject/node_modules/nx/bin/nx.js
  • /usr/local/lib/node_modules/nx/bin/nx.js

@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