question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows yarn vite Command failed

See original GitHub issue

Hi,

I am getting command failed when trying to run npm run vite in my vue project. Am I missing any prerequisities?

npm ERR! code 1
npm ERR! path C:\Users\user\Documents\project
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./bin/vite

I only ran vue add vite. I can see these 3 files were changed:

image

Is there anything else that needs to be done?

I have

  • @vue/cli 4.2.3
  • Latest Windows 10
  • node v12.20.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ufologistcommented, Feb 22, 2021

try edit ./bin/vite

const serveService = spawn('vite', params, { cwd, stdio: 'inherit' }) => const serveService = spawn('vite', params, { cwd, stdio: 'inherit', shell: process.platform === 'win32' })

SPAWN NPM ENOENT

1reaction
michalhudecekcommented, Feb 20, 2021

I see. Perfect! Works like a charm. It is working for me now. Should I close this issue?

The original taks was for making it work on Windows itself but WSL is fine with me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error Command failed with exit code 1. when I try to run yarn
what you need to do is just simple: follow these steps: rm -rf node_modules; yarn cache clean; yarn; yarn start.
Read more >
Troubleshooting - Vite
Switch to another package manager (e.g. pnpm , yarn ); Remove & from the path to your project. Dev Server #. Requests are...
Read more >
yarn create vite error | The AI Search Engine You Control
I'm trying to create a frontend project in Vite, using the yarn create vite command, but I'm getting the following error: error with...
Read more >
create-vite - npm
js version to work, please upgrade if your package manager warns about it. With NPM: $ npm create vite@latest. With Yarn: $ yarn...
Read more >
Vite Is Not Recognized as an Internal or External Command
This video is about to fix javascript vite vanila Error : Vite Is Not ... or External Command :Operable program or batch file#ViteVanila......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found