Open erinleigh90 opened 3 weeks ago
Hi I am trying to deploy a monorepo from github to aws amplify. I want to deploy only the frontend and anytime i try i get error in the build. It always fails. This is the console error from the amplify. `2024-08-25T15:52:32.645Z [INFO]: # Cloning repository: git@github.com:HerbertNtim/inventory.git
1
2024-08-25T15:52:33.136Z [INFO]:
2
2024-08-25T15:52:33.136Z [INFO]: Cloning into 'inventory'...
3
2024-08-25T15:52:33.137Z [INFO]: # Checking for Git submodules at: /codebuild/output/src1160078849/src/inventory/.gitmodules
4
2024-08-25T15:52:33.147Z [INFO]: # Retrieving environment cache...
5
2024-08-25T15:52:33.189Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})}
6
2024-08-25T15:52:33.189Z [INFO]: ---- Setting Up SSM Secrets ----
7
2024-08-25T15:52:33.189Z [INFO]: SSM params {"Path":"/amplify/d21063oi285gli/master/","WithDecryption":true}
8
2024-08-25T15:52:34.020Z [INFO]: No live updates for this build run
9
2024-08-25T15:52:34.025Z [INFO]: # Retrieving cache...
10
2024-08-25T15:52:34.056Z [INFO]: # Retrieved cache
11
2024-08-25T15:52:37.439Z [INFO]: ## Starting Backend Build
12
13
14
15
2024-08-25T15:52:37.445Z [INFO]: {"backendDuration": 0}
16
17
18
19
2024-08-25T15:52:52.074Z [WARNING]: npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
20
2024-08-25T15:52:52.523Z [WARNING]: npm WARN
21
2024-08-25T15:52:52.523Z [WARNING]: deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
22
2024-08-25T15:52:53.683Z [WARNING]: npm WARN deprecated
23
2024-08-25T15:52:53.683Z [WARNING]: @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
24
2024-08-25T15:52:53.712Z [WARNING]: npm WARN
25
2024-08-25T15:52:53.713Z [WARNING]: deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
26
2024-08-25T15:52:54.091Z [WARNING]: npm WARN
27
2024-08-25T15:52:54.091Z [WARNING]: deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
28
2024-08-25T15:52:54.210Z [WARNING]: npm WARN deprecated @emotion/style@0.8.0: Please use @emotion/styled
package
29
2024-08-25T15:53:04.849Z [INFO]: added 509 packages, and audited 510 packages in 19s
30
2024-08-25T15:53:04.855Z [INFO]: 150 packages are looking for funding
31
run npm fund
for details
32
1 moderate severity vulnerability
33
To address all issues, run:
34
npm audit fix
35
Run npm audit
for details.
36
2024-08-25T15:53:04.871Z [INFO]: # Completed phase: preBuild
37
38
39
2024-08-25T15:53:05.219Z [INFO]: > client@0.1.0 build
40
next build
41
2024-08-25T15:53:05.903Z [INFO]: ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
42
2024-08-25T15:53:05.918Z [INFO]: Attention: Next.js now collects completely anonymous telemetry regarding usage.
43
2024-08-25T15:53:05.918Z [INFO]: This information is used to shape Next.js' roadmap and prioritize features.
44
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
45
46
2024-08-25T15:53:05.989Z [INFO]: ▲ Next.js 14.2.5
47
2024-08-25T15:53:05.989Z [INFO]:
48
2024-08-25T15:53:06.068Z [INFO]: Creating an optimized production build ...
49
2024-08-25T15:53:32.565Z [INFO]: ✓ Compiled successfully
50
2024-08-25T15:53:32.570Z [INFO]: Linting and checking validity of types ...
51
2024-08-25T15:53:38.597Z [WARNING]: Failed to compile.
52
2024-08-25T15:53:38.602Z [WARNING]: ../server/src/controller/expenseController.ts:1:30
53
Type error: Cannot find module '@prisma/client' or its corresponding type declarations.
54
[0m[31m[1m>[22m[39m[90m 1 |[39m [36mimport[39m { [33mPrismaClient[39m } [36mfrom[39m [32m"@prisma/client"[39m[33m;[39m[0m
55
[0m [90m |[39m [31m[1m^[22m[39m[0m
56
[0m [90m 2 |[39m [36mimport[39m { [33mResponse[39m[33m,[39m [33mRequest[39m } [36mfrom[39m [32m"express"[39m[33m;[39m[0m
57
[0m [90m 3 |[39m[0m
58
[0m [90m 4 |[39m [36mconst[39m prisma [33m=[39m [36mnew[39m [33mPrismaClient[39m()[33m;[39m[0m
59
2024-08-25T15:53:38.698Z [ERROR]: !!! Build failed
60
2024-08-25T15:53:38.698Z [INFO]: Please read more about Amplify Hosting's support for SSR frameworks to find if your build failure is related to an unsupported feature: https://docs.aws.amazon.com/amplify/latest/userguide/amplify-ssr-framework-support.html. You may also find this troubleshooting guide useful: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html
61
2024-08-25T15:53:38.698Z [ERROR]: !!! Error: Command failed with exit code 1
62
2024-08-25T15:53:38.698Z [INFO]: # Starting environment caching...
63
2024-08-25T15:53:38.699Z [INFO]: # Environment caching completed
`
Describe the content issue: In the Gen2 documentation, the top-level SSR page is specific to NextJS. We need to port over the SSR Generic Adapter guide so SSR customers using other frameworks can easily find those instructions.
URL page where content issue is: https://docs.amplify.aws/react/build-a-backend/server-side-rendering/