Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actionsでnpm run productionをしたとき、243のエラーが出る。 #25

Open
s-nagamine-lab opened this issue Jul 3, 2022 · 7 comments

Comments

@s-nagamine-lab
Copy link

「TerraformでFargateを構築してGithub Actionでデプロイ」をやっていて、4章の4.23のデプロイをしたところ、npm run productionをしたとき、243のエラーが出て止まります。こちらのコードをコピーして、feature/push_images_to_ecrにプッシュ時に走らせるようにしても同様です。
https://github.com/shonansurvivors/laravel-fargate-app/blob/chapter-4/.github/workflows/deploy.yml

スクリーンショット 2022-07-03 19 03 24

こちら何か解決策はありますでしょうか?

@s-nagamine-lab
Copy link
Author

s-nagamine-lab commented Jul 3, 2022

追記です。
こちらのChapter 4のタグのソースをコピーしてきて、プッシュして動かしても、同様の結果になりました。
https://github.com/shonansurvivors/laravel-fargate-app/tree/chapter-4
スクリーンショット 2022-07-03 19 51 09

@shonansurvivors
Copy link
Owner

@s-nagamine-lab
ご連絡ありがとうございます!
確認させていただきますのでいましばらくお時間をください。

@s-nagamine-lab
Copy link
Author

@shonansurvivors
ご対応いただきありがとうございます!

ちなみに243エラーに関してnpmに問い合わせたところ、以下のような回答が返ってきました。これを踏まえて、こちらでも調査します。

Hi,
Thanks for contacting Support!
Please provide the following, so we can investigate.
• npm whoami
• debug.log file (located in your .npm directory)
• screenshots
If you are unsure of where your .npm directory is located, npm config get cache should return the location. To force generate a debug.log file, run npm install --timing. The debug.log file has a larger stacktrace for us to analyze.

@179Bell
Copy link

179Bell commented Aug 29, 2022

@shonansurvivors
失礼します。
現在私の方でも同じエラーが起きています。
同様にGitHubからソースコードをコピーして実行しても同様のエラーが発生しております。
こちらのエラーの現在の状況はいかがでしょうか。

@shonansurvivors
Copy link
Owner

@s-nagamine-lab @179Bell
以下を試していただけますでしょうか?

+      - uses: actions/setup-node@v3
+        with:
+          node-version: 16
+
-      - run: docker-compose exec -T web npm ci
+      - run: npm ci
         if: ${{ !steps.cache-npm-ci.outputs.cache-hit }}
+        working-directory: backend

-      - run: docker-compose exec -T web npm run prod
+      - run: npm run prod
+        working-directory: backend

@179Bell
Copy link

179Bell commented Sep 1, 2022

@shonansurvivors
ご対応いただきありがとうございます。
npm run prodについては走りました。
しかしながらPush nginx image to ecrError: Process completed with exit code 1.で失敗してしまいます。
ソースコードについてはGitHubリポジトリに上がっているものと比較して間違いがないことを確認しております。

@shonansurvivors
Copy link
Owner

@179Bell
AWSリソース側の名前や設定などは書籍の通りでしょうか?その辺りの設定と、GitHub Actionsの処理内容が噛み合っておらずうまくいかない、ということも考えられると思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants