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.

vue-cli-service does not run in cmd.exe or Powershell

See original GitHub issue

Version

3.0.0-beta.6

Reproduction link

https://gist.github.com/mrberggg/18d54d105f8cbfa64bd03cb63f9fdfdf

Steps to reproduce

Create a new project with vue cli, then navigate to folder.

In bash run vue-cli-service serve or ./node_modules/.bin/vue-cli-service serve. Serve will work properly.

In Powershell/cmd.exe, run vue-cli-service serve. Will show the following error: 'vue-cli-service' is not recognized as an internal or external command

Try running the service manually by running .\node_modules\.bin\vue-cli-service serve. Will pop open Windows’ ‘How do you want to open this file?’ dialog.

What is expected?

Should run correctly in cmd.exe/Powershell.

What is actually happening?

Does not run.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:20

github_iconTop GitHub Comments

37reactions
mrbergggcommented, Apr 17, 2018

This was an obscure npm edge case, not related to vue-cli. Was using npm in bash on windows to develop, had to test in cmd.exe. Apparently npm only generates .cmd files for Windows when you run npm install from cmd.exe or Powershell. Deleting node_modules and re-installing from cmd.exe fixes this.

8reactions
kmc059000commented, Dec 30, 2018

Similar problem for me. Deleting node_modules and reinstalling with yarn fixed my problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve 'vue-cli-service' is not recognized as an internal ...
Try deleting the node_modules folder and after that run npm i from the cmd. Then try running npm run serve again and see...
Read more >
'vue-cli-service' is not recognized as an internal or external ...
To solve the error "'vue-cli-service' is not recognized as an internal or external command, operable program or batch file", install the @vue/cli-service ......
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
Try running your designated integrated terminal shell outside VS Code from an external terminal or command prompt. Some terminal launch failures may be...
Read more >
CLI Service - Vue CLI
The vue-cli-service serve command starts a dev server (based on webpack-dev-server) that comes with Hot-Module-Replacement (HMR) working out of ...
Read more >
Install Vue.js directly on Windows | Microsoft Learn
Open a command line (ie. Windows Command Prompt or PowerShell). ... Vue CLI is a toolkit for working with Vue in your terminal...
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