@sekieitou

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

AWSAmplifyでチュートリアル通りにしているもののデプロイが出来ない

解決したい事象

現在、表題の通りAWS Amplifyのチュートリアルに従って学習をしようとしています。

  1. スターターアプリをコピーし、リポジトリを作成
  2. デプロイ
  3. ローカルにクローン
  4. Todoの削除機能を追加
  5. gitにpush、Amplifyにデプロイ

でAmplifyで下記のエラーが発生しています。
どのようにすれば解決するか、何を確認すればの観点がわかりません、教えていただきたいです。

解決方法

下記のバグを踏んでいたので、下記の通り行う。
https://github.com/aws/aws-cdk/issues/37949

環境

環境名 version
Ubuntu 24.04.4 LTS
node v20.20.2
npm 10.8.2
git version 2.43.0

自分で試したこと

  1. 環境に記載のバージョンで問題がないかの確認し、問題がないことを確認
  2. チュートリアルを最初からやり直し、再度発生した
  3. ローカルでnpm installは問題なく動くが、npm ciはエラーが発生する。
  4. ローカルでTodolistの追加/削除は出来る。
    1. この状態でデプロイすると上記のエラーが発生する。

エラー内容

52

2026-07-29T16:05:53.230Z [WARNING]: npm error code EUSAGE

53

2026-07-29T16:05:53.230Z [WARNING]: npm error

54 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

55 npm error

56 npm error Missing: @aws-cdk/toolkit-lib@1.19.0 from lock file

57 npm error Missing: @aws-cdk/cloud-assembly-api@2.2.0 from lock file

(中略)

169 npm error Run "npm help ci" for more info

170

2026-07-29T16:05:53.231Z [WARNING]: npm error A complete log of this run can be found in: /codebuild/output/src1589985098/src/nextjs_sake_review/.npm/_logs/2026-07-29T16_05_36_755Z-debug-0.log

171

2026-07-29T16:05:53.242Z [ERROR]: !!! Build failed

package.json

{
  "name": "amplify-vite-react-template",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },
  "dependencies": {
    "@aws-amplify/ui-react": "~6.13.2",
    "aws-amplify": "~6.15.10",
    "react": "~18.3.1",
    "react-dom": "~18.3.1"
  },
  "engines": {
    "node": ">= 20.20.0",
    "npm": ">= 10.8.0"
  },
  "devDependencies": {
    "@aws-amplify/backend": "~1.19.0",
    "@aws-amplify/backend-cli": "^1.9.0",
    "@eslint/compat": "~2.0.1",
    "@eslint/eslintrc": "~3.3.3",
    "@eslint/js": "~9.39.2",
    "@types/react": "~18.3.27",
    "@types/react-dom": "~18.3.7",
    "@typescript-eslint/eslint-plugin": "~8.53.0",
    "@typescript-eslint/parser": "~8.53.0",
    "@vitejs/plugin-react": "~5.1.2",
    "esbuild": "~0.27.2",
    "eslint": "~9.39.2",
    "eslint-plugin-react-hooks": "~7.0.1",
    "eslint-plugin-react-refresh": "~0.4.26",
    "globals": "~17.0.0",
    "typescript": "~5.9.3",
    "vite": "~7.3.1"
  }
}

0 likes

No Answers yet.

Your answer might help someone💌