0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrant を使用してvue-cli をgestOSで使用する際に、vue create実行時にエラーが発生してハマったこと

Posted at

Vue CLIを作成(vue create my-cli)

名前はなんでもよいとして、今回は。

npm install -g @vue/cli

と。ここでつまずく。

下記のエラーがでてしまう。

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2019-10-11T10_51_25_764Z-debug.log
ERROR command failed: npm install --loglevel error

よく見ると、ログの上のほうに、

npm ERR! codeEI0
npm ERR! syscall symlink

とあり、どうやらシンボリックリンクの作成に失敗している模様。

解決策

Windowsホスト上のVagrantのシンボリックリンクフォルダでyarn installできない問題の解決
を参考に、Vagrantfileの修正を行うも、やはりエラー。

とりあえず、共有をかけていないところで実行すると、正常に作成されることから、シンボリックリンクの何かだと思っていたのかと思い・・・。
色々調べていると、Windowsのファイルのパスの長さでは??と疑い、そもそものubuntsのパスを
C:\vagrant\ubuntu64_16\workspace\my-cli
など、直接C:\直下にに移動すると、今度は正常に作成できました!!

Windowsのファイルパスの文字数の制約は結構短いので注意しないといけないですね。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?