3.0.0-rc.10
Windows 10 Enterprise / Node 8.9.1 / Yarn 1.7.0 / GitBash (MINGW64)
A clean shutdown of the task without error
ERROR while running task C:UsersxxxxGitHubxxxx-app:serve with message'spawn vue-cli-service ENOENT'
{ Error: spawn vue-cli-service ENOENT
at notFoundError (C:UsersxxxxAppDataLocalYarnDataglobalnode_modulescross-spawnlibenoent.js:6:26)
at verifyENOENT (C:UsersxxxxAppDataLocalYarnDataglobalnode_modulescross-spawnlibenoent.js:40:16)
at ChildProcess.cp.emit (C:UsersxxxxAppDataLocalYarnDataglobalnode_modulescross-spawnlibenoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn vue-cli-service',
path: 'vue-cli-service',
spawnargs: [ 'serve', '--mode', 'development', '--dashboard' ] }
Are you using the UI?
Yes!
Creating a new Vue cli 3 project via commandline also crashes
Vue CLI v3.0.0-rc.10
✨ Creating project in /Users/raymond/stack/sites/xml.
🗃 Initializing git repository...
⚙ Installing CLI plugins. This might take a while...
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @vue/cli-plugin-babel@^3.0.0-rc.11
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'xml'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/raymond/.npm/_logs/2018-08-07T15_32_34_730Z-debug.log
ERROR command failed: npm install --loglevel error
@focussing Please create a new issue, yours is unrelated to this one.
Same is happening here. Using 3.0.0-rc.11. Stopping npm serve from the UI causes an error in the terminal.
Updated to 3.0.0 and this is still occurring.
w10 pro, node 10.5.0, vue/cli 3.0.0, vue ui.
Stopping server via ui also causes an error
Error while running task C:\dev\testssr10:serve with message 'spawn vue-cli-service ENOENT'{ Error: spawn vue-cli-service ENOENT
at notFoundError (C:\Users\germs\AppData\Roaming\npm\node_modules\@vue\cli\node_modu
les\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\germs\AppData\Roaming\npm\node_modules\@vue\cli\node_modul
es\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\germs\AppData\Roaming\npm\node_modules\@vue\cli\no
de_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn vue-cli-service',
path: 'vue-cli-service',
spawnargs: [ 'serve', '--mode', 'development', '--dashboard' ] }win10, node 10.5.0, vue/cli 3.0.0, vue 2.5.17
vue ui:
Stopping server/build:
:serve/build with message 'spawn vue-cli-service ENOENT'
in terminal:
serve-->
{ Error: spawn vue-cli-service ENOENT at notFoundError (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:6:26) at verifyENOENT (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:40:16) at ChildProcess.cp.emit (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn vue-cli-service',
path: 'vue-cli-service',
spawnargs: [ 'serve', '--mode', 'development', '--dashboard' ] }
build-->
{ Error: spawn vue-cli-service ENOENT at notFoundError (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:6:26) at verifyENOENT (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:40:16) at ChildProcess.cp.emit (C:UsersdellAppDataLocalYarnDataglobalnode_modulesexecanode_modulescross-spawnlibenoent.js:27:25) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn vue-cli-service',
path: 'vue-cli-service',
spawnargs:
[ 'build', '--mode','production', '--dest', 'dist', '--target', 'app', '--dashboard' ] }
what should i do? it happen after i remove the register-server-worker.js and the relative files.
ping @Akryum
Same is happening with the last release.. need any log info or something to help you with?
Note: not happening to me on linux with node 10.8.0
Note happening on linux node 8.9.1 either, so looks like a Windows-related issue.
I did some research but still don't have any idea why node is throwing this ENOENT error when killing the process... It's not a critical issue anyway, since the processes seem to be correctly killed.
happend to me also, windows 10.
When i stop the serve task or when i try to build it... let me know if its helps to share something.
I'm getting the same issue but only when I run "npm run build" and I have a style (CSS) included in a component. It works fine without any styles in components.
Windows: 10
Node : 9.9.0
npm: 6.4.0
Vue: 2.5.17
VuuCLI: 3.0.0
Happens here as well, on Windows (10), and since it seemed to be a Windows issue (which indeed it is) I decided to take some time and investigate this, here's what I found:
vue-cli runs a task: it uses execa, which is a wrapper over cross-spawn, which in turn is a wrapper over child_process.spawn() - see tasks.js:299vue-cli stops a task: it uses terminate, which uses process.kill() - see tasks.js:463Windows does not support sending signals, but Node.js offers some emulation with process.kill(), and subprocess.kill()
- emulation which is incomplete, in the sense that if you
process.kill()a child process spawned withchild_process.spawn(), it will receive an exit event withcodeset to1andsignalset tonull- in other words, on Windows it's impossible to distinguish between a process that exited with an exit code of 1 and a process that was killed
- interestingly enough, when using subprocess.kill() (instead of
process.kill()) you get a correctexitevent withcodeset tonullandsignalset to the signal used (i.e.SIGTERM, which is the signal used if not giving an argument tokill())- unfortunately
subprocess.kill()has the drawback that, if the spawned child spawns in turn other sub-processes, those will not be killed and just be left hanging around when killing the child - that's the problemterminateis trying to solve- now, putting all the pieces together, what happens is this:
vue-clicallsterminate(), which callsprocess.kill(), the child process receives anexitevent withcodeset to1,cross-spawn"hijacks" this event and in turn emits anerrorevent, whichvue-clicatches and shows the error.
Fixing this is not trivial, as we can't easily distinguish between this "false" ENOENT caused by Windows process behavior and a legitimate ENOENT - like when trying to execute a non-existing command or setting cwd to a non-existing folder (are there others?).
So what we could do:
error handler check if we're on Windows (process.platform === 'win32') and if the error is ENOENT (error.code === 'ENOENT'), if yes then'foo' is not recognized as an internal or external command,
operable program or batch file. (we'll have to collect stderr output to a local variable) andcwd exists and it's a folderENOENT, so call the exit handler with code set to null.It's ugly (and maybe misses some other ENOENT cases?), but I see no other way. If maintainers agree on this solution, I can create a PR.
check if the command's stderr contains 'foo' is not recognized as an internal or external command, operable program or batch file.
Except error messages are localized.
Might not be, I just tested on a Romanian localized Windows, and that error is still in English.

Yeah, sadly I get the same with French. Looks like they forgot to translate this to Romanian...
Ok, another option would be to look for the command in PATH, so that we're sure that it exists, and if we get a ENOENT it's not because the command doesn't exist.
Another approach would be to consider the command execution duration - if we're on Windows and we get a ENOENT after more than 1 second, it's most probably a "false" one (this will not cover the case where you press on start and immediately on stop; a workaround would be to disable the button for 1s after starting a task).

Most helpful comment