Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Start the Extension due to ENOENT #542

Closed
4 tasks done
CHC383 opened this issue Nov 22, 2024 · 2 comments · Fixed by #555
Closed
4 tasks done

Can't Start the Extension due to ENOENT #542

CHC383 opened this issue Nov 22, 2024 · 2 comments · Fixed by #555

Comments

@CHC383
Copy link
Contributor

CHC383 commented Nov 22, 2024

Describe the bug

When I open VSCode, it says

There was an error during Vitest startup. Check the output for more details.

Please let me know if there are better ways to debug or collect more details.

Reproduction

This seems to be related to the environment, specifically the oh-my-zsh framework.

This is on:
MacOS: 15.1.1
VSCode: 1.95.3
Vitest extension: 1.8.1
Vitest: 2.1.5

Output

[INFO 2:33:12 PM] [API] Running Vitest v2.1.5 (xxx/vitest.config.ts) with Node.js@: node () {
	for func in _omz_nvm_load nvm node npm npx pnpm pnpx yarn corepack
	do
		if (( $+functions[$func] ))
		then
			unfunction $func
		fi
	done
	[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
	_omz_nvm_setup_completion
	_omz_nvm_setup_autoload
	if [[ "$0" != _omz_nvm_load ]]
	then
		"$0" "$@"
	fi
} 
[Error 2:33:12 PM] [API] [Error Error] spawn node () {
	for func in _omz_nvm_load nvm node npm npx pnpm pnpx yarn corepack
	do
		if (( $+functions[$func] ))
		then
			unfunction $func
		fi
	done
	[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
	_omz_nvm_setup_completion
	_omz_nvm_setup_autoload
	if [[ "$0" != _omz_nvm_load ]]
	then
		"$0" "$@"
	fi
} ENOENT
Error: spawn node () {
	for func in _omz_nvm_load nvm node npm npx pnpm pnpx yarn corepack
	do
		if (( $+functions[$func] ))
		then
			unfunction $func
		fi
	done
	[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
	_omz_nvm_setup_completion
	_omz_nvm_setup_autoload
	if [[ "$0" != _omz_nvm_load ]]
	then
		"$0" "$@"
	fi
} ENOENT
	at ChildProcess._handle.onexit (node:internal/child_process:286:19)
	at onErrorNT (node:internal/child_process:484:16)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[Error 2:33:12 PM] [Error Error] spawn node () {
	for func in _omz_nvm_load nvm node npm npx pnpm pnpx yarn corepack
	do
		if (( $+functions[$func] ))
		then
			unfunction $func
		fi
	done
	[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
	_omz_nvm_setup_completion
	_omz_nvm_setup_autoload
	if [[ "$0" != _omz_nvm_load ]]
	then
		"$0" "$@"
	fi
} ENOENT
Error: spawn node () {
	for func in _omz_nvm_load nvm node npm npx pnpm pnpx yarn corepack
	do
		if (( $+functions[$func] ))
		then
			unfunction $func
		fi
	done
	[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
	_omz_nvm_setup_completion
	_omz_nvm_setup_autoload
	if [[ "$0" != _omz_nvm_load ]]
	then
		"$0" "$@"
	fi
} ENOENT
	at ChildProcess._handle.onexit (node:internal/child_process:286:19)
	at onErrorNT (node:internal/child_process:484:16)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Version

1.8.1

Validations

@CHC383
Copy link
Contributor Author

CHC383 commented Dec 8, 2024

Still not sure about the root cause, but was able to get it work by setting vitest.shellType to terminal according to #510 (comment)

@CHC383
Copy link
Contributor Author

CHC383 commented Dec 13, 2024

This is likely due to the lazy loading mode in the Oh My Zsh nvm plugin, please see microsoft/playwright#33996 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant