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

yarn3 pnp - Cannot find a local installation of Nx. #2017

Closed
elizww opened this issue Feb 6, 2024 · 4 comments · Fixed by #2070
Closed

yarn3 pnp - Cannot find a local installation of Nx. #2017

elizww opened this issue Feb 6, 2024 · 4 comments · Fixed by #2070
Assignees
Labels
type: bug Something isn't working

Comments

@elizww
Copy link

elizww commented Feb 6, 2024

Current Behavior

Error running '....'
Cannot find a local installation of Nx.

Expected Behavior

any target should run from nx-console

Steps to Reproduce

Failure Logs / Images / Videos

2024-02-06 14:41:44,455 [1631841] INFO - #c.i.e.r.ExecutionUtil - Error running 'client-ligo-admin-feature-positions:storybook':
Cannot find a local installation of Nx.
com.intellij.execution.ExecutionException: Cannot find a local installation of Nx.
at dev.nx.console.utils.NxExecutable$Companion.getExecutablePath(NxExecutable.kt:40)
at dev.nx.console.run.NxCommandLineState.startProcess(NxCommandLineState.kt:82)
at com.intellij.javascript.nodejs.execution.NodeBaseRunProfileState$Companion.runInBackground(NodeBaseRunProfileState.kt:57)
at com.intellij.javascript.nodejs.execution.NodeBaseRunProfileState$Companion.access$runInBackground(NodeBaseRunProfileState.kt:40)
at com.intellij.javascript.nodejs.execution.NodeBaseRunProfileState$Companion$executeUnderProgress$1.run(NodeBaseRunProfileState.kt:48)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:840)

Environment

  • Yarn version: 3.9.3 with pnp
  • Nx Console version: 1.18.0
  • VSCode version:
  • Webstorm version: 2023.3.2
@elizww elizww added the type: bug Something isn't working label Feb 6, 2024
@Cammisuli
Copy link
Member

Has this worked for you before? I'm going to have to set up a repo and try it myself.

We're using the jetbrains APIs to get the node interpreter and package manager, so hopefully nothing has changed there.

Thanks for the report!

@MaxKless if you dont mind taking a look when you come back.

@elizww
Copy link
Author

elizww commented Feb 8, 2024

I think it stopped working when we move to yarn3 and pnp, but honestly I don't know if it was before or after moving to pnp, it worked with yarn 1

@MaxKless MaxKless self-assigned this Feb 12, 2024
@MaxKless
Copy link
Collaborator

Hey sorry I lost track of this! Does this happen for all nx repos you use or just the one? Is there any way you could set up a minimal repro and share it with me so I can track this down?
Also, it would be great if you could run nx report and paste the results here so I know what platform to look for.

@ChoSeoHwan
Copy link

I'm encountering the same error in WebStorm 2023.3 across two different environments.

  • windows 11
  • mac os (Monterey)

nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 20.9.0
   OS     : darwin-x64
   yarn   : 4.1.1
   
   nx                 : 17.3.1
   @nx/js             : 17.3.1
   @nx/jest           : 17.3.1
   @nx/eslint         : 17.3.1
   @nx/workspace      : 17.3.1
   @nx/devkit         : 17.3.1
   @nx/esbuild        : 17.3.1
   @nx/eslint-plugin  : 17.3.1
   @nx/nest           : 17.3.1
   @nx/node           : 17.3.1
   @nx/plugin         : 17.3.1
   @nx/webpack        : 17.3.1
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @jscutlery/semver : 4.2.0
   ---------------------------------------
   Local workspace plugins:
         @notification-service/nx

When looking at the code of nx console, it appears to simply use the API to import the package provided within webstorm.

So, I tried to raise the issue directly on webstorm's youtrack, but
Since I am not a developer of nx console, I may leave an issue with incorrect information, so I did not leave a separate comment.

If this issue is an issue with webstorm itself, could you please add the issue to webstorm's youtrack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants