LoginSignup
2
0

More than 1 year has passed since last update.

AWS Amplify CLIのインストール時にエラッた件

Posted at

はじめに

AWSが公開しているチュートリアルであるAWS Amplifyを利用したReactアプリケーションの構築を進めていたところ、つまずいた点がありましたのでその解決までをまとました。
※一旦解決した、という状況なので理由等は後で整理したいと思います。

では見ていきます!

今回使用するツールなどのバージョン

どこでエラーとなったか

チュートリアルにあるAmplify CLIをインストールする時に下記のような①②のエラーが発生しました。

  • Amplify CLIをインストールする
npm install -g @aws-amplify/cli
エラー①
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
エラー②
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /xxx/.nvm/versions/node/v16.14.0/lib/node_modules/@aws-amplify/cli
npm ERR! dest /xxx/.nvm/versions/node/v16.14.0/lib/node_modules/@aws-amplify/.cli-LTvuxHj1
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/xxx/.nvm/versions/node/v16.14.0/lib/node_modules/@aws-amplify/cli' -> '/xxx/.nvm/versions/node/v16.14.0/lib/node_modules/@aws-amplify/.cli-LTvuxHj1'

npm ERR! A complete log of this run can be found in:

対応した内容

グーグル先生に頼った結果、下記コマンドを実行することによりエラーは無くなりました!

npm config set fetch-retry-maxtimeout 120000
npm config set proxy false
npm cache verify
rm -fr /xxx/.nvm/versions/node/v16.14.0/lib/node_modules/@aws-amplify

私の事象は解決したけど・・・

バージョン問題や、WSL2利用などが問題だったのかはもう少し調査必要ですが
同じ問題で悩んでいる人の手助けになればと思い、すぐ投稿しましたw
解決したよって人はイイネ待ってます^^

2
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
2
0