You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've migrated my workspace from yarn to pnpm with the hope to get around this issue: wxt-dev/wxt#1058
with success so far.
However, now I'm facing a new problem which I haven't had before, and I'm not sure if it is Nx related, pnpm related or has something to do with the new Node installation (used Vola over NVM to install Node and pnpm).
I'm trying to run a build script from the package.json
$ pnpm nx run my-app:build
> [email protected] nx C:\Users\MyPc\Workspace\my-project
> nx "run" "my-app:build"
> nx run my-app:build
> [email protected] build C:\Users\MyPc\Workspace\my-project\apps\my-app
> nuxt generate
Der Befehl "nuxt" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
ELIFECYCLE Command failed with exit code 1.
For whatever reason, it is english mixed with german.
When I navigate to apps/my-app in the terminal and run nuxt build it works perfectly.
So it seems Nx has different environment variables than the Git bash I'm using in IntelliJ
To verify that, I've compared the output of running pnpm nx run my-app:print-env-info with running echo ${SHELL:-/bin/bash}; echo ${LANG:-en_US.UTF-8}; printenv manually in the terminal, and indeed, while the Nx command only points to ..../my-project/apps/my-app/node_modules/.bin the manual command from the terminal points to the root node_modules/.bin!
Another observation is that running the script in package.json with IntelliJ's RunConfiguration also fails with the same error.
This issue also appears to happen in GitHub Actions.
Why do / can the environment variables differ?
How can I tell Nx to use the root-level node_modules/.bin for whatever command it executes?
Expected Behavior
To behave identically to the local shell and find the binaries in the submodules
GitHub Repo
No response
Steps to Reproduce
As I have no idea what may influence the environment variables Nx is using (or even the shell) I'd like to get some information first to narrow down the scope
You may need to check your terminal settings in IntelliJ to ensure that it is using git bash, and not something else like powershell. That could be the reason that your environment variables are different. https://www.jetbrains.com/help/idea/settings-tools-terminal.html
For your build script, you could use npx nuxt instead of just nuxt as a workaround.
I'm using Git Bash in IntelliJ already and this shell is aware of the .bin directory.
However it seems nx:run-scripts is then launching CMD instead of the shell it is launched from, which was not aware of the directory. Maybe that's the default shell used by Node.
As a workaround I've added the absolute path to my project's node_modules/.bin to my Windows Environment variables, as bad as that sounds.
It works for me, because I only have one project I'm currently using on my machine.
Current Behavior
Hello, I've migrated my workspace from yarn to pnpm with the hope to get around this issue: wxt-dev/wxt#1058
with success so far.
However, now I'm facing a new problem which I haven't had before, and I'm not sure if it is Nx related, pnpm related or has something to do with the new Node installation (used Vola over NVM to install Node and pnpm).
I'm trying to run a build script from the
package.json
and I'm getting this output error
For whatever reason, it is english mixed with german.
When I navigate to apps/my-app in the terminal and run
nuxt build
it works perfectly.So it seems Nx has different environment variables than the Git bash I'm using in IntelliJ
To verify that, I've compared the output of running
pnpm nx run my-app:print-env-info
with runningecho ${SHELL:-/bin/bash}; echo ${LANG:-en_US.UTF-8}; printenv
manually in the terminal, and indeed, while the Nx command only points to..../my-project/apps/my-app/node_modules/.bin
the manual command from the terminal points to the root node_modules/.bin!Another observation is that running the script in package.json with IntelliJ's RunConfiguration also fails with the same error.
This issue also appears to happen in GitHub Actions.
Expected Behavior
To behave identically to the local shell and find the binaries in the submodules
GitHub Repo
No response
Steps to Reproduce
As I have no idea what may influence the environment variables Nx is using (or even the shell) I'd like to get some information first to narrow down the scope
Nx Report
Node : 22.9.0
OS : win32-x64
Native Target : x86_64-windows
pnpm : 9.12.1
nx : 20.0.1
@nx/js : 20.0.1
@nx/jest : 20.0.1
@nx/eslint : 20.0.1
@nx/workspace : 20.0.1
@nx/devkit : 20.0.1
@nrwl/devkit : 19.6.0
@nx/esbuild : 20.0.1
@nx/eslint-plugin : 20.0.1
@nx/express : 20.0.1
@nx/node : 20.0.1
@nx/nuxt : 20.0.1
@nx/playwright : 20.0.1
@nx/vite : 20.0.1
@nx/vue : 20.0.1
@nx/web : 20.0.1
@nx/webpack : 20.0.1
typescript : 5.6.3
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/playwright/plugin
Community plugins:
@jnxplus/nx-gradle : 1.14.0
@theunderscorer/nx-semantic-release : 2.12.0
The following packages should match the installed version of nx
Failure Logs
No response
Package Manager Version
pnpm latest
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: