LoginSignup
0
0

More than 3 years have passed since last update.

vue ui コマンドで起動エラー spawn cmd ENOENT

Posted at

環境

  • Windows10
  • npm 6.14.8
  • Node.js v14.15.0
  • vue @vue/cli 4.5.11

問題

vue CLIのプロジェクト管理ツールを起動するために下記のコマンドを実行するとエラーが発生する
vue ui

Starting GUI...
Ready on http://localhost:8000
events.js:170
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:253:12)
at onErrorNT (internal/child_process.js:431:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)

環境変数にパスを通しPC再起動で解決

  1. 環境変数に C:\Windows\System32\を追加
  2. PCを再起動

再度実行したら無事画面が起動

参考 https://stackoverflow.com/questions/28624686/get-spawn-cmd-enoent-when-try-to-build-cordova-application-event-js85

環境変数を設定したら再起動が必要

はじめ環境変数を追加しても変わらないので滅入りそうになっていました。
設定が反映されるのは、再起動後なんですね。学びました。。

ちなみにENOENT とは、Error No Entryの略で、ファイル・ディレクトリが存在しないという意味のエラーメッセージらしいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0