Closed vire closed 1 year ago
Is there any error message in the dev tools window? (help -> toggle developer tools)
Or in the output window?
Unfortunately, I can't see Nx Console in my vscode output
Is there any error message in the dev tools window? (help -> toggle developer tools)
Can you try this?
I can see
Ya I've had this same problem for a week or two now. That file exists in node_modules/nx/presets
too.
Just upgraded to nx 15.0.12. Same problem. My nx console = 17.25.0.
btw I'm on yarn --version 👉 3.2.2
so I don't have node_modules
at all and I know NX does not support yarn2+
but it worked till v17.22.0
yarn v1 classic for me
I can't seem to reproduce this even in yarn repos. Do either of you have a repo where this happens that I can access?
@vire can you expand the error message so I have a bit more information?
@jpaas do you get the same 'Activating failed. Cannot find module' exception?
Yes I get the same error. If I look in the Extension (host) logs I see
2022-11-09 09:01:55.770 [error] Activating extension nrwl.angular-console failed due to an error:
2022-11-09 09:01:55.770 [error] Error: Cannot find module 'nx/presets/npm.json'
at Function.t [as resolve] (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:1:882)
at t.Workspaces.readNxJson (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:22:518449)
at a (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:22:509130)
at Object.56797 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:22:527636)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.51031 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:27:24348)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.28919 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:27:14706)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.14560 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/172.js:22:28848)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.55860 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:1:36265)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.33834 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:1:35788)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.30526 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:1:35661)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at Object.65376 (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:1:2706)
at s (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39483)
at /Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39584
at Function.s.O (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39834)
at s.x (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:39604)
at Function.s.x (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:40716)
at /Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:40729
at Object.<anonymous> (/Users/jpaas/.vscode/extensions/nrwl.angular-console-17.25.0/main.js:169:40832)
at Module.u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
at Module.load (node:internal/modules/cjs/loader:1035:32)
at Module._load (node:internal/modules/cjs/loader:876:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.a._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:118:14563)
at Function.v._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:64900)
at Function.w._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:64268)
at Module.require (node:internal/modules/cjs/loader:1059:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Function.r [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:101)
at h._loadCommonJSModule (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:66459)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
I can't seem to reproduce this even in yarn repos. Do either of you have a repo where this happens that I can access?
@vire can you expand the error message so I have a bit more information?
@jpaas do you get the same 'Activating failed. Cannot find module' exception?
I have the same output as @jpaas
Sorry @MaxKless this is on a private repo
have you tried running nx reset
and reloading the window yet?
So I discovered something today about this issue. Normally I launch VS Code by running vscode .
from the root of my monorepo. This is because some extensions struggle with my rvm (ruby version manager) environment unless I do this. When I launch VS Code this way, the NX extension always fails to load the preset.
However if I just launch VS Code as an app from the OS, the NX extension works fine.
nx reset
doesn't make a difference
I have the same issue. Also if I try to refresh the console I get an error:
The console errors are the following:
Before the update, it was working fine. Now even if I revert the version I can't seem to make it work. Thanks.
I was able to fix it by reinstalling vs code. Now everything works.
I've been trying a lot but I can't reproduce this. Would be very grateful for a repo or any additional information you have on this.
I have the same issue.
Can't share my repo though, it's private :)
Tried nx reset
without any luck.
Starting vscode from the OS launcher fixes it, rather than opening it from the terminal if that helps ...
I've been having the same issue for a while. Opening folders form terminal via code .
fails with the error @vire reported above. However, the file core.json
is present in node_modules/nx/presets
.
If I open vscode from the launcher like @abitbetterthanyesterday mentioned, it works fine.
ditto on the extension launch failure from either code .
or code foo.code-workspace
it launches just fine when clicking on a launch icon though. I'm running Ubuntu 18, so this isn't a mac-specific issue.
We still hear you all, and we're not ignoring this. But it's hard to track down this issue because we dont experience it ourselves.
I tried on multiple computers with different OSs and I still haven't stumbled across this issue.
I'm still going to keep my eyes opened and see if something comes up
Unfortunately my repo is private also.
When I display the Extensions Host log I get the same issue regarding 'nx/presets/npm.json' others have listed
The pop up error is the same "command 'nxConsole.refreshWorkspace' not found".
Running nx reset didn't help.
Several months ago on a machine with a different OS (mac), I was getting the "command 'nxConsole.refreshWorkspace' not found". I was able to work around by it downgrading the nx console extension by a dot version or two. That workaround didn't work in this case.
Yesterday I noticed I still had nx 14.x installed (don't remember exact version) so I migrated to the lastest version. This didn't help either, although I figured that was a longshot anyway.
Is there any other info besides (below) which would be useful?
Node : 14.17.1 OS : linux x64 yarn : 1.22.19
Community plugins:
Version: 1.74.0 Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91 Date: 2022-12-05T16:47:18.476Z Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Linux x64 4.15.0-200-generic Sandboxed: No
code --list-extensions batisteo.vscode-django bibhasdn.django-html bierner.markdown-footnotes ceyhunkeklik.vscode-ngrok-client dbaeumer.vscode-eslint deerawan.vscode-dash dirk-thomas.vscode-lark donjayamanne.githistory eamodio.gitlens EditorConfig.EditorConfig esbenp.prettier-vscode firsttris.vscode-jest-runner folke.vscode-monorepo-workspace formulahendry.terminal gieson.dupe-file GitHub.copilot GitHub.vscode-pull-request-github googlecloudtools.cloudcode henoc.svgeditor hiro-sun.vscode-emacs HookyQR.beautify HTMLHint.vscode-htmlhint jock.svg kamikillerto.vscode-linthtml lostintangent.vsls-whiteboard MakhmudovEvgeniy.currenttodos miramac.vscode-exec-node ms-azuretools.vscode-docker ms-python.python ms-python.vscode-pylance ms-toolsai.jupyter ms-toolsai.jupyter-keymap ms-toolsai.jupyter-renderers ms-toolsai.vscode-jupyter-cell-tags ms-toolsai.vscode-jupyter-slideshow ms-vscode-remote.remote-containers ms-vscode.atom-keybindings ms-vsliveshare.vsliveshare ms-vsliveshare.vsliveshare-audio ms-vsliveshare.vsliveshare-pack nrwl.angular-console okitavera.vscode-nunjucks-formatter Prisma.prisma ritwickdey.LiveServer ronnidc.nunjucks shamanu4.django-intellisense silvenon.mdx tootone.org-mode VisualStudioExptTeam.intellicode-api-usage-examples VisualStudioExptTeam.vscodeintellicode xyc.vscode-mdx-preview yzhang.markdown-all-in-one
I'm trying to isolate what it might be. Our private repo where this happens is a package-based repo with 1 react native app and 2 react apps + a react native library. We are right up-to-date with Nx 15.3.3. Our default app is the react native app.
I just tried creating new nx repos using both the react native and react presets and I can't reproduce it.
@vire @stelescuraul @sts125 @abitbetterthanyesterday are your repos package-based too?
I can't reproduce this for the life of me and I'm just trying to find a common thread in addition to the code .
behaviour.
Have you all tried reinstalling VSCode too? :D
@MaxKless I have an integrated repo with a few react apps, some react component libs, and a few plain old javascript libs.
Until now, I didn't think this had anything to do with my repo, but rather my machine being screwed up, but I'm seeing the same issue on my mac now. Reinstalling vscode didn't fix it.
Here's the exact error output, in case it differs from others:
2022-12-15 16:37:48.901 [error] Activating extension nrwl.angular-console failed due to an error:
2022-12-15 16:37:48.901 [error] Error: Cannot find module 'nx/presets/npm.json'
at Function.t [as resolve] (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:882)
at t.Workspaces.readNxJson (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:22:518449)
at a (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:22:509130)
at 56797 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:22:527636)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 51031 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:27:24348)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 28919 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:27:14706)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 14560 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/172.js:22:28848)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 55860 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:36527)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 33834 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:36050)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 30526 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:35923)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at 65376 (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:2556)
at s (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39633)
at /Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39734
at s.O (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39984)
at s.x (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:39754)
at s.x (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:40866)
at /Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:40879
at Object.<anonymous> (/Users/sts125/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:177:40982)
at u._compile (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:1313)
at Module._extensions..js (node:internal/modules/cjs/loader:1220:10)
at Module.load (node:internal/modules/cjs/loader:1035:32)
at Module._load (node:internal/modules/cjs/loader:876:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at r._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13379)
at w._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:61900)
at v._load (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:61293)
at Module.require (node:internal/modules/cjs/loader:1059:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Function.r [as __$__nodeRequire] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:101)
at d.pb (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:63164)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
@MaxKless yes and no, ours was package based until now but currently making the switch.
I know I had issues before about our code .
was not loading environment variables properly.
I will try to reinstall VsCode, and see if my colleague has the same issue.
Will keep you updated.
@MaxKless we use integrated repo in ours (also private, sorry).
Let me know what kind of info you need us to provide.
I am also having this problem, Nx Console version 17.27.1 does not work properly here. It says:
Error: Cannot find module 'nx/presets/core.json'
at Function.t [as resolve] (/home/pc/.vscode/extensions/nrwl.angular-console-17.27.1/main.js:1:882)
But I checked and there is a nx/presets/core.json at the node_modules, also tried installed globally and it did not work.
The only way to make this work is to downgrade the v17.23.1 version. There is no special reason for choosing that version, I just wanted one that works so I choose one random and it work lol. Later I can see which version introduced the problem.
@danieldspx are you also starting VSCode through the CLI?
@danieldspx are you also starting VSCode through the CLI?
Yes, always 😅
Hey I'm sorry that we still haven't found a solution here. Can I just check in and ask whether y'all are still facing the same issue?
I was seeing the exact same issue, for my private integrated repo, on both my Mac and Linux boxes. I'm currently at my mac, and it's working now!
NX and all extensions => 15.3.2 VS Code => 1.77.3 NX Console =>18.0.4
I'll report back regarding my linux box when I have a chance.
@vire @jpaas @danieldspx is this still happening for you?
I just tried again. We're now up to nx 16.3.2. I opened the project with code .
and it seems to work now. Nx extension is now populated. Thanks for following up @MaxKless
Same for me @MaxKless , everything working fine. Thanks for the support.
In that case I'll close this issue. Thanks everyone for your assistance. Let me know if anything else breaks ;)
Seems like this is still an issue...
The package is present in my node_modules
folder:
Things I tried and didn't work:
File > Open Folder
code .
nx reset
Version: 1.84.0 (user setup) Commit: d037ac076cee195194f93ce6fe2bdfe2969cc82d Date: 2023-11-01T11:29:04.398Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22621
Nx Console v18.10.0 nx@17.0.3
Having the same issue as @shyagamzo described
Activating extension 'nrwl.angular-console' failed: Cannot find module '@nx/nx-win32-x64-msvc'
Updated Nx Console to the recently launched v18.10.1. The extension now activates but the projects panel is missing:
that's rly weird haha. I'm not seeing the same issue, can you right click and see if you can find the view? Otherwise pls make a new issue
Solved.
Seems like I played with the layouts in my attempts to fix this and the panel disappeared.
This did the final trick:
Ctrl + Shift + P
> View: Reset View Locations
Thanks Max.
Thanks everyone! I'm locking this issue to prevent spam for all participants. If you're still encountering issues, please make new issues!
might relate to #1197
(last working version![image](https://user-images.githubusercontent.com/4021908/200335765-2dbbdcdd-a8c9-477a-88e2-faab9c89ad00.png)
v17.23.2
)Steps to Reproduce
Failure Logs / Images / Videos
Environment
nx-console: v17.24.2
`vscode veersion: 1.73.0 (Universal)