Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

'vue-cli-service' is not recognized as an internal or external command - when running "yarn run electron:serve" #122

Closed
TimPietrusky opened this issue Jun 6, 2020 · 7 comments · Fixed by #124
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@TimPietrusky
Copy link
Member

TimPietrusky commented Jun 6, 2020

When executing yarn run electron:serve on Windows, I get this error:

$ vue-cli-service electron:serve
'vue-cli-service' is not recognized as an internal or external command

I tried to do this:

npm install -g @vue/cli
vue add electron-builder

but this doesn't work. What should we do here to solve it?

@TimPietrusky TimPietrusky added bug Something isn't working documentation Improvements or additions to documentation labels Jun 6, 2020
@2xAA
Copy link
Member

2xAA commented Jun 6, 2020

@vue/cli-service and vue-cli-plugin-electron-builder are part of the repo's packages.

If a package was installed as a devDependency it should be locally executable from ./node_modules/.bin as those binaries are added to the $PATH.

As those executables are nested, could it be your yarn version is out of date?
You might want to check your ./node_modules/.bin folder for the "missing" executables.

Apparently yarn had an issues with nested executables a while ago: yarnpkg/yarn#760

I'd like to avoid having npx as a dependency as we're not reliant on npm.

@2xAA
Copy link
Member

2xAA commented Jun 6, 2020

For reference:

My current yarn version is v1.22.4 and the only global modules I have are commitizen and windows-build-tools.

On Windows I've used PowerShell as admin and the repo from builds cleanly. Tested on a new clone.

@TimPietrusky
Copy link
Member Author

  • I updated yarn to v1.22.4
  • Removed node_modules
  • Removed @vue/cli & electron-builder globally with npm

But still doesn't run. Maybe something wrong with my PATH?

@TimPietrusky
Copy link
Member Author

TimPietrusky commented Jun 6, 2020

The main folder of my projects was created in WSL, which means is case-sensitive by default. This can be validated on Windows with on the CLI:

fsutil.exe file queryCaseSensitiveInfo <path-to-the-folder-you-want-to-check>

# Example
fsutil.exe file queryCaseSensitiveInfo "C:\dev"

Then I recreated the parent folder, clone the repo and installed everything and now it works.

@TimPietrusky
Copy link
Member Author

It would be nice if we could link to the solution in the documentation, as this might happen to other people using WSL mixed with CMD/Powershell.

@2xAA
Copy link
Member

2xAA commented Jun 6, 2020

Totally. I will add this.

@2xAA
Copy link
Member

2xAA commented Jun 6, 2020

More detail can be found here: yarnpkg/yarn#5813

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants