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
I'm just trying to create a new workspace using npx create-nx-workspace command. I have the following error:
Error: Command failed: bun --version
/bin/sh: 1: bun: not found
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at getPackageManagerVersion (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/src/utils/package-manager.js:101:50)
at getPackageManagerCommand (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/src/utils/package-manager.js:39:23)
at createSandbox (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/src/create-sandbox.js:20:84)
at createWorkspace (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/src/create-workspace.js:19:61)
at main (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/bin/create-nx-workspace.js:118:72)
at Object.handler (/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/bin/create-nx-workspace.js:103:11)
at /mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/yargs/build/index.cjs:1:8993 {
status: 127,
signal: null,
output: [ null, '', '/bin/sh: 1: bun: not found\n' ],
pid: 188003,
stdout: '',
stderr: '/bin/sh: 1: bun: not found\n'
}
Expected Behavior
It just should work. I don't have bun anywhere. I debugged the code and found following code:
/** * Detects which package manager was used to invoke create-nx-{plugin|workspace} command * based on the main Module process that invokes the command * - npx returns 'npm' * - pnpx returns 'pnpm' * - yarn create returns 'yarn' * * Default to 'npm' */functiondetectInvokedPackageManager(){letdetectedPackageManager='npm';// mainModule is deprecated since Node 14, fallback for older versionsconstinvoker=require.main||process['mainModule'];// default to `npm`if(!invoker){returndetectedPackageManager;}for(constpkgManagerofexports.packageManagerList){if(invoker.path.includes(pkgManager)){detectedPackageManager=pkgManager;break;}}returndetectedPackageManager;}
So the point is - my cwd is: /mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/bin and it does include bun because of uBUNtu.. But it doesn't mean at all it has to use bun manager.
This code needs to be reworked, sorry!
GitHub Repo
No response
Steps to Reproduce
Just create a folder containing bun in the path like i use:
'/mnt/wsl/workspace/ubuntu/nx-cap-gen'
Create a new workspace inside using command: npx create-nx-workspace test
Make sure you have no bun available otherwise it will execute using bun.
Current Behavior
I'm just trying to create a new workspace using
npx create-nx-workspace
command. I have the following error:Expected Behavior
It just should work. I don't have bun anywhere. I debugged the code and found following code:
So the point is - my cwd is:
/mnt/wsl/workspace/ubuntu/nx-cap-gen/node_modules/create-nx-workspace/bin
and it does include bun because of uBUNtu.. But it doesn't mean at all it has to use bun manager.This code needs to be reworked, sorry!
GitHub Repo
No response
Steps to Reproduce
Just create a folder containing bun in the path like i use:
'/mnt/wsl/workspace/ubuntu/nx-cap-gen'
npx create-nx-workspace test
Make sure you have no bun available otherwise it will execute using bun.
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: