nx-console icon indicating copy to clipboard operation
nx-console copied to clipboard

Nx Generate UI not working in IntelliJ

Open gwesterman opened this issue 2 years ago • 10 comments

Current Behavior

Clicking Generate in the Nx Generate UI with a seemingly valid configuration does not do anything.

If the configuration is invalid (for example if no library name has been entered), clicking Generate will cause the appropriate error to be shown.

Expected Behavior

I would expect code be generated according to the configuration.

I've only started using this plugin, after switching from Nx Console Idea.

Steps to Reproduce

  1. Open IntelliJ
  2. Right-click on folder in Project View
  3. Select `Nx Generate (UI)
  4. Select @nx/angular - library
  5. Enter a name for the library (the only required field)
  6. Click Generate

Failure Logs / Images / Videos

There are no failure logs

Environment

  • Nx Console version: 1.13.1
  • IntelliJ version: IntelliJ IDEA 2023.2.2 (Ultimate Edition)

Nx Report

Node: 16.17.1 OS: darwin-x64 npm: 8.15.0

nx: 16.7.2 @nx/js: 16.7.2 @nx/jest: 16.7.2 @nx/linter: 16.7.2 @nx/workspace: 16.7.2 @nx/angular: 16.7.2 @nx/cypress: 16.7.2 @nx/devkit: 16.7.2 @nx/eslint-plugin: 16.7.2 @nx/nest: 16.7.2 @nx/node: 16.7.2 @nx/storybook: 16.7.2 @nrwl/tao: 16.7.2 @nx/webpack: 16.7.2 nx-cloud: 16.4.0-beta.1 typescript: 5.1.6

Community plugins: @auth0/auth0-angular: 2.2.1 @ngneat/transloco: 4.3.0 @nxrocks/nx-flutter: 5.3.0 @storybook/angular: 7.3.2

gwesterman avatar Sep 18 '23 12:09 gwesterman

I had a similar issue and after resetting my node path (in IntelliJ) and restarting the commands started to work.

steven10172 avatar Sep 20 '23 04:09 steven10172

Can you also try running an nx action directly from the IntelliJ run menu for existing apps/libs? That triggered an error when other commands were not.

steven10172 avatar Sep 20 '23 04:09 steven10172

After enabling the plugin and restarting this error was thrown as soon as I entered a name for the library, before I even pressed Generate.

Exception in plugin Nx Console (1.13.1).

This plugin is not a production of JetBrains. Please report the problem to the plugin vendor.

com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "/Users/gwesterman/Work/monorepo/nx" (in directory "/Users/gwesterman/Work/monorepo"): error=13, Permission denied at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:356) at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:84) at com.intellij.execution.process.OSProcessHandler.(OSProcessHandler.java:44) at com.intellij.execution.process.KillableProcessHandler.(KillableProcessHandler.java:41) at com.intellij.execution.process.ColoredProcessHandler.(ColoredProcessHandler.java:23) at com.intellij.execution.process.KillableColoredProcessHandler.(KillableColoredProcessHandler.java:29) at com.intellij.execution.process.KillableColoredProcessHandler.(KillableColoredProcessHandler.java:21) at dev.nx.console.generate.run_generator.RunGeneratorManager.runGenerator$lambda$1(RunGeneratorManager.kt:72) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:685) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:589) at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:589) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) Caused by: java.io.IOException: Cannot run program "/Users/gwesterman/Work/monorepo/nx" (in directory "/Users/gwesterman/Work/monorepo"): error=13, Permission denied at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:432) at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:346) ... 44 more Caused by: java.io.IOException: error=13, Permission denied at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) at java.base/java.lang.ProcessImpl.(ProcessImpl.java:314) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ... 47 more

I noticed, that Nx Console was claiming "We couldn't find any projects in this workspace". This was fixed after checking out my code at a new location, after which I was able to run commands like Nx Graph: View Full Project Graph successfully via the Run Menu.

Running app/library specific commands does not work. In this case I'm presented with Process finished with exit code 127 (command not found). Then again, running app/library commands via the Run Menu or the Run button in the project.json file has never worked for me. I can only run them via a package.json script, which is fine.

I'm not sure what to do at this point, for now I will continue using Nx Console Idea.

gwesterman avatar Sep 21 '23 00:09 gwesterman

Hey! Have you tried starting IntelliJ with elevated/admin permissions? Looks like that could help?

MaxKless avatar Oct 09 '23 15:10 MaxKless

Could you please advise on how to do this on MacOS?

Running the following command

gwesterman@gwesterman-mba /Applications % sudo IntelliJ\ IDEA.app/Contents/MacOS/idea Password:

results in the following error being thrown:

2023-12-15 15:58:32.139 idea[15618:685283] allVms required 1.8*,1.8+ 2023-12-15 15:58:32.141 idea[15618:685287] Cannot load JVM bundle: Error Domain=NSCocoaErrorDomain Code=3585 "dlopen_preflight(/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))" UserInfo={NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib, NSDebugDescription=dlopen_preflight(/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib) => false, tried: '/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (no such file), '/Applications/IntelliJ IDEA.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), NSBundlePath=/Applications/IntelliJ IDEA.app/Contents/jbr, NSLocalizedDescription=The bundle “JBR-17.0.8+7-1000.22-jcef 17.0.8” couldn’t be loaded because it doesn’t contain a version for the current architecture.}

I would also expect a plugin not to require running IntelliJ with elevated priviliges, especially since the plugin it seeks to replace (Nx Console Idea) ran perfectly fine without them for ages.

gwesterman avatar Dec 15 '23 14:12 gwesterman

We don't require running with elevated privileges. It looks like something happened in your setup. Two thoughts looking at the error messages:

  • "/Users/gwesterman/Work/monorepo/nx" (in directory "/Users/gwesterman/Work/monorepo"): error=13, Permission denied - I had something similar when I installed my packages with elevated permissions but ran my code without it. Maybe hard resetting the repo from git might work
  • is an incompatible architecture (have 'arm64', need 'x86_64'))" maybe you have the wrong version of intellij installed on your mac? there's a separate one for apple silicon

Do you encounter this error in different repos or just this one specific setup? If you could provide a minimal reproduction it will make it 1000x easier for me to help out.

MaxKless avatar Dec 15 '23 14:12 MaxKless

Have the same issue it is working only for one repo for rest of them it's failing com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "/Users/piotrjarzabek/Dev/Revo/app/nx" (in directory "/Users/piotrjarzabek/Dev/Revo/app"): error=13, Permission denied at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:356) at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:84) at com.intellij.execution.process.OSProcessHandler.(OSProcessHandler.java:44) at com.intellij.execution.process.KillableProcessHandler.(KillableProcessHandler.java:41) at com.intellij.execution.process.ColoredProcessHandler.(ColoredProcessHandler.java:23) at com.intellij.execution.process.KillableColoredProcessHandler.(KillableColoredProcessHandler.java:29) at com.intellij.execution.process.KillableColoredProcessHandler.(KillableColoredProcessHandler.java:21) at dev.nx.console.generate.run_generator.RunGeneratorManager.runGenerator$lambda$1(RunGeneratorManager.kt:71) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:208) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:190) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.openapi.application.impl.ApplicationImpl$4.run(ApplicationImpl.java:478) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:121) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:690) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:593) at com.intellij.openapi.application.impl.ApplicationImpl.runWithoutImplicitRead(ApplicationImpl.java:1485) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593) at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368) at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:997) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:997) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92) Caused by: java.io.IOException: Cannot run program "/Users/piotrjarzabek/Dev/Revo/app/nx" (in directory "/Users/piotrjarzabek/Dev/Revo/app"): error=13, Permission denied at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073) at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:432) at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:346) ... 44 more Caused by: java.io.IOException: error=13, Permission denied at java.base/java.lang.ProcessImpl.forkAndExec(Native Method) at java.base/java.lang.ProcessImpl.(ProcessImpl.java:314) at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110) ... 47 more

PiotrMistu avatar Jan 21 '24 21:01 PiotrMistu

Hey @PiotrMistu can you also paste your nx report so I know what your environment is like?

"/Users/gwesterman/Work/monorepo/nx" (in directory "/Users/gwesterman/Work/monorepo"): error=13, Permission denied - I had something similar when I installed my packages with elevated permissions but ran my code without it. Maybe hard resetting the repo from git might work

Have you tried this @gwesterman ?

MaxKless avatar Jan 22 '24 10:01 MaxKless

@MaxKless I have the same issue on one of my project and not on the other one:

However running the command in the terminal works perfectly. And hard to reproduce

failing project:

   Node   : 18.18.2
   OS     : darwin-arm64
   npm    : 9.8.1
   
   nx (global)        : 17.2.8
   nx                 : 17.2.8
   @nx/js             : 17.2.8
   @nx/jest           : 17.2.8
   @nx/linter         : 17.2.8
   @nx/eslint         : 17.2.8
   @nx/workspace      : 17.2.8
   @nx/angular        : 17.2.8
   @nx/cypress        : 17.2.8
   @nx/devkit         : 17.2.8
   @nx/eslint-plugin  : 17.2.8
   @nx/plugin         : 17.2.8
   @nrwl/tao          : 17.2.8
   @nx/web            : 17.2.8
   @nx/webpack        : 17.2.8
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @ngrx/component          : 17.0.1
   @ngrx/component-store    : 17.0.1
   @ngrx/effects            : 17.0.1
   @ngrx/entity             : 17.0.1
   @ngrx/router-store       : 17.0.1
   @ngrx/schematics         : 17.0.1
   @ngrx/store              : 17.0.1
   @rx-angular/cdk          : 17.0.0
   @rx-angular/state        : 17.0.0
   @rx-angular/template     : 17.0.1
   @testing-library/angular : 15.1.0
   ---------------------------------------
   Local workspace plugins:
         @angular-challenges/custom-plugin
         @angular-challenges/cli

Working project:

  Node   : 18.18.2
   OS     : darwin-arm64
   npm    : 9.8.1
   
   nx (global)        : 17.2.8
   nx                 : 17.1.3
   @nx/js             : 17.1.3
   @nx/jest           : 17.1.3
   @nx/linter         : 17.1.3
   @nx/eslint         : 17.1.3
   @nrwl/linter       : 15.9.7
   @nx/workspace      : 17.1.3
   @nx/angular        : 17.1.3
   @nx/cypress        : 17.1.3
   @nx/devkit         : 17.1.3
   @nx/eslint-plugin  : 17.1.3
   @nx/nest           : 17.1.3
   @nx/node           : 17.1.3
   @nx/playwright     : 17.1.3
   @nx/plugin         : 17.1.3
   @nx/react          : 17.1.3
   @nx/storybook      : 17.1.3
   @nrwl/tao          : 17.1.3
   @nx/vite           : 17.1.3
   @nx/web            : 17.1.3
   @nx/webpack        : 17.1.3
   typescript         : 5.2.2
   ---------------------------------------
   Community plugins:
   @ngrx/component-store : 17.0.0
   @nx-go/nx-go          : 2.8.0
   @nx/remix             : 17.0.0
   @nx/rspack            : 17.0.0
   @storybook/angular    : 7.5.3
   qwik-nx               : 0.15.7

tomalaforge avatar Jan 29 '24 13:01 tomalaforge

Thanks for the report @tomalaforge. I'm not really sure how Nx Console can be involved here. From the stacktrace you can see that we're trying to run nx from node_modules but access isn't allowed. Did you install node_modules from elevated permissions somehow but didn't run IntelliJ the same? Can you check what the permissions are on the nx file listed in the stack trace? Otherwise try to elevate the permissions via the terminal like here https://stackoverflow.com/a/3092869 ? Maybe a hard reset from git will work?

MaxKless avatar Mar 25 '24 10:03 MaxKless

Hey @gwesterman @tomalaforge @PiotrMistu @steven10172 is this still happening? I haven't been able to reproduce it... Are you on locked-down company computers with limited permissions? Did you check some of the steps I have listed above?

MaxKless avatar May 07 '24 11:05 MaxKless

@MaxKless I don't have an error anymore but the generate button doesn't work. but it's only on one of my project and I cannot figure out what's the difference with the rest. but the copy button works, so it's not too annoying 😅

tomalaforge avatar May 07 '24 12:05 tomalaforge

wow what a weird error :D can you see if there's anything in idea.log, an error of some kind?

MaxKless avatar May 07 '24 12:05 MaxKless

@MaxKless I don't have much on the file

2024-05-07 15:19:12,386 [346176259]   INFO - #dev.nx.console.generate.ui.file.DefaultNxGenerateUiFile - received message GenerateUiRunGeneratorOutputMessage(payloadType=run-generator, payload=GenerateUiRunGeneratorPayload(positional=@nx/angular:library, flags=[--name=toto, --projectNameAndRootFormat=as-provided, --no-interactive, --dry-run], cwd=null))
2024-05-07 15:19:12,387 [346176260]   INFO - #dev.nx.console.utils.NxExecutable - Checking if there is standalone nx
2024-05-07 15:19:17,357 [346181230]   INFO - #dev.nx.console.generate.ui.file.DefaultNxGenerateUiFile - received message GenerateUiRunGeneratorOutputMessage(payloadType=run-generator, payload=GenerateUiRunGeneratorPayload(positional=@nx/angular:library, flags=[--name=toto, --projectNameAndRootFormat=as-provided, --no-interactive], cwd=null))
2024-05-07 15:19:17,358 [346181231]   INFO - #dev.nx.console.utils.NxExecutable - Checking if there is standalone nx

tomalaforge avatar May 07 '24 13:05 tomalaforge

I still have the same error actually

com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "/Users/thomaslaforge/Documents/Project/perso/angular-challenges/nx" (in directory "/Users/thomaslaforge/Documents/Project/perso/angular-challenges"): error=13, Permission denied

I tried to run a nx command from the project.json and I got this error.

tomalaforge avatar May 07 '24 13:05 tomalaforge

hm okay... and it only happens for one of your projects? Have you tried these steps?

Can you check what the permissions are on the nx file listed in the stack trace? Otherwise try to elevate the permissions via the terminal like here https://stackoverflow.com/a/3092869 ? Maybe a hard reset from git will work?

MaxKless avatar May 07 '24 13:05 MaxKless

ok the solution is simple, a NX file was created as the root of the application. I just deleted that file and now everything is working fine.

tomalaforge avatar May 07 '24 14:05 tomalaforge

what file was it?

MaxKless avatar May 07 '24 14:05 MaxKless

I don't know. The file was created when I created my project with the nx command.

https://github.com/tomalaforge/angular-challenges/commit/7ea87b99a8fb7a182c69ef1655a0409665d8ef19 to look at the file, but it's an empty file

tomalaforge avatar May 07 '24 14:05 tomalaforge

crazy... do you happen to know what version you created the repo with? Glad it's resolved for you, though :) @gwesterman @PiotrMistu do you also happen to have this file lying around?

MaxKless avatar May 07 '24 15:05 MaxKless

Hey, I completely forgot about this ticket, my bad.

Several updates of Nx and the schematics have led to this not being an issue anymore.

I'm trying to think back and I think the problem was related to the schematics and at some point I found a workaround. I had to create the top-level folder that the schematic would have created and run Nx Generate from within that folder. Then it worked for the most part with only minor adjustments needed.

So let's say the library should have been called profile, then I would have had to create a folder with the name profile, right-click on it and then click Nx Generate (UI).

gwesterman avatar May 20 '24 21:05 gwesterman

Hmmm okay, this is probably to do with the cwd changes. Glad it's not an issue anymore. Let me know if you run into any other issues and feel free to leave a review on the JetBrains marketplace :)

MaxKless avatar May 21 '24 08:05 MaxKless

this remains an issue the NxConsole is unusable

https://github.com/nrwl/nx-console/issues/2167

and field developers would like it fixed so we can develop unhindered

nhhockeyplayer avatar Jun 13 '24 05:06 nhhockeyplayer

Hey I'm not sure if anyone is still having this issue... but if you do, can you check whether you have an nx folder at the root of your workspace? That might be related and it would be interesting information for the future.

MaxKless avatar Jun 20 '24 14:06 MaxKless