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

[Bug]: vscode config "PATH:" ".console-ninja/.bin:${env:PATH}" causes nx console fail

Open dev-seahouse opened this issue 2 years ago • 5 comments

What happened?

i am using nx console plugin and nvm, and noticed that this was added to settings and it cause 'yarn not found' error.

	"terminal.integrated.env.linux": {
		"PATH": "/home/kenan/.console-ninja/.bin:${env:PATH}"
	}

Version

v0.0.98

Steps to reproduce (or sample repo)

  1. click on serve from nx console inside vscode image
  2. yarn command not found error is shown image

If i remove this from vscode, everything can be found.

	"terminal.integrated.env.linux": {
		"PATH": "/home/kenan/.console-ninja/.bin:${env:PATH}"
	}

I am using nvm, i suppose that 'yarn' could not be found because somehow nvm path got removed.

Could this be caused by incorrectly appending the path environmental variables?

Log output

zsh:1: command not found: yarn

 *  The terminal process "/usr/bin/zsh '-c', 'yarn nx serve go-advisor --configuration=development'" terminated with exit code: 127. 
 *  Terminal will be reused by tasks, press any key to close it.

dev-seahouse avatar Mar 29 '23 09:03 dev-seahouse

What does which yarn return if you return the setting back to

"terminal.integrated.env.linux": {
  "PATH": "/home/kenan/.console-ninja/.bin:${env:PATH}"
}

and execute the command in a new integrated terminal session?

NikGovorov avatar Mar 29 '23 09:03 NikGovorov

I'm getting the same on a mac when running a task in VSCode:

/page/index.js:150:13)
 *  Executing task: pnpm run xyz
 *  The terminal process "/bin/zsh '-c', 'pnpm run xyz'" failed to launch (exit code: 127). 
 *  Terminal will be reused by tasks, press any key to close it. 

Tried removing the setting that console-ninja set (sneaky!), but it re-appeared. Having to disable the extension.

@NikGovorov to answer your question, when I run which pnpm using a task, I get the following:

Executing task: which pnpm  

 *  The terminal process failed to launch: Path to shell executable "which pnpm" does not exist.

ebeloded avatar Mar 29 '23 12:03 ebeloded

It looks like a bug in VS Code, we've deleted the setting in the latest version of Console Ninja extension.

NikGovorov avatar Mar 29 '23 12:03 NikGovorov

It looks like a bug in VS Code, we've deleted the setting in the latest version of Console Ninja extension.

thanks. my pnpm was suddenly failing etc.

patroza avatar Mar 29 '23 12:03 patroza

Blocked by https://github.com/microsoft/vscode/issues/178577

NikGovorov avatar May 02 '23 04:05 NikGovorov