2021年7月12日 更新

記事のステータス通知の確認

292 view お気に入り 0

【作業用BGM】 13時間カフェMUSIC!ジャズ&ボサノバBGM!勉強+集中用にも!

個人的に少しハマったのでメモ

PS C:\Users\myname> yarn create nuxt-app helloworld
yarn create v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-nuxt-app@2.12.0" with binaries:
      - create-nuxt-app
'C:\Program' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
error Command failed.
Exit code: 1
Command: C:\Program Files (x86)\Nodist\bin\bin\create-nuxt-app
Arguments: helloworld
Directory: C:\Users\myname
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

success Installed "create-nuxt-app@2.12.0" with binaries: - create-nuxt-app ‘C:\Program’ は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 error Command failed. Exit code: 1 Command: C:\Program Files (x86)\Nodist\bin\bin\create-nuxt-app Arguments: helloworld Directory: C:\Users\myname Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.```

事象

yarn createでNuxtのプロジェクトを作成しようとした際にエラー

環境

  • OS: Windows10
  • yarn: v1.21.1
  • node: v10.15.2(Nodistでバージョン管理)
  • Nodist: 0.8.8

原因

NodistのインストールディレクトリをデフォルトのC:\Program Files (x86)配下にしてしまったため、実行時コマンドに半角スペースが入ってしまい正しくcreate-nuxt-appが実行できない。

暫定対応

本来はNodistのインストールディレクトリを変更するなどが好ましいが、直接create-nuxt-appがあるディレクトリを指定して実行する。

powershell c:\Progra~2\Nodist\bin\bin\create-nuxt-app helloworld Progra~2の表記については以下の記事を参照 https://grum.hatenablog.com/entry/2017/05/16/110000

関連する記事 こんな記事も人気です♪

この記事のキュレーター

管理者管理者

この記事へのコメント

コメントはまだありません

コメントを書く