Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
889 stars 528 forks source link

[Chore] Weird error during deployment - stripe plugin #399

Open dfberry opened 12 months ago

dfberry commented 12 months ago

Are you accessing the project from the GitHub Codespaces?

Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!

Describe the bug

azd deploy ends with error in stripe build

Additional context Add any other context about the problem here. image

@dfberry ➜ /workspaces/contoso-real-estate (dfberry/1106-update-core) $ azd deploy

Deploying services (azd deploy)

  (✓) Done: Deploying service api
  - Endpoint: https://func-api-xglyu662p43gg.azurewebsites.net/

  (✓) Done: Deploying service blog
  - Endpoint: https://ca-blog-xglyu662p43gg.yellowplant-aad68697.westeurope.azurecontainerapps.io/

  (✓) Done: Deploying service cms
  - Endpoint: https://ca-cms-xglyu662p43gg.yellowplant-aad68697.westeurope.azurecontainerapps.io/

  (✓) Done: Deploying service portal
  - Endpoint: https://green-smoke-0d178ed03.4.azurestaticapps.net/

  (x) Failed: Deploying service stripe

ERROR: failed building service 'stripe': failing invoking action 'build', building container: stripe at ../..: building image: exit code: 1, stdout: , stderr: #1 [internal] load build definition from Dockerfile
#1 sha256:d7a464b21135d02dcd17cc95ea0ad5c1abe913aca2aa583fdcd4c15ed55f7d34
#1 transferring dockerfile: 35B 0.0s done
#1 DONE 0.1s

#2 [internal] load .dockerignore
#2 sha256:dbe42afe6a57abb17b2c4f504ab6d524f87701a735d37bb3e88dcc5fffacff52
#2 transferring context: 2B done
#2 DONE 0.2s

#3 resolve image config for docker.io/docker/dockerfile:1
#3 sha256:ac072d521901222eeef550f52282877f196e16b0247844be9ceb1ccc1eac391d
#3 ...

#4 [auth] docker/dockerfile:pull token for registry-1.docker.io
#4 sha256:227cd7943917067e8548f6d0e79afb5630307db19edbbf4c8f2a0e92139fd631
#4 DONE 0.0s

#3 resolve image config for docker.io/docker/dockerfile:1
#3 sha256:ac072d521901222eeef550f52282877f196e16b0247844be9ceb1ccc1eac391d
#3 DONE 0.8s

#5 docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021
#5 sha256:94d31f7191390ebf1aa76bc23bdbd269fd7a0432f853889e4918b44513a34946
#5 CACHED

#6 [internal] load build definition from Dockerfile
#6 sha256:4e91d87db7f519e6e5b7101daf7fe783cf811d8bfa817231243ad35c62070160
#6 DONE 0.0s

#7 [internal] load metadata for docker.io/library/node:18-alpine
#7 sha256:c7ddcdb449347fb14fd88eab6b6351683fc669399d296a38e5a23e64c4ea7112
#7 DONE 0.4s

#8 [internal] load .dockerignore
#8 sha256:f878aaf087f3543b627a86be5fce29292f0a1d15f5fb01fd98b38a59abd91ccf
#8 DONE 0.0s

#11 [internal] load build context
#11 sha256:5c83b8ee1ffd157a88e359365b30dd8fa29606ef3d471373744fa76747c5aa61
#11 DONE 0.0s

#9 [build 1/6] FROM docker.io/library/node:18-alpine@sha256:435dcad253bb5b7f347ebc69c8cc52de7c912eb7241098b920f2fc2d7843183d
#9 sha256:61283b99751f58c35471ae32237b70a1e252bc94777d3f0d913c5d42db3e0ecd
#9 DONE 0.0s

#11 [internal] load build context
#11 sha256:5c83b8ee1ffd157a88e359365b30dd8fa29606ef3d471373744fa76747c5aa61
#11 transferring context: 1.06MB 0.0s done
#11 DONE 0.1s

#10 [build 2/6] WORKDIR /app
#10 sha256:15222719171bd71d7b2640483547f50b7dcc2359e13a941910291e1f2557d199
#10 CACHED

#12 [build 3/6] COPY ./package*.json ./
#12 sha256:ab1f5634c490cd3c2b1b8f064dce0385c4e9c286d6c074a644622d5f456abf8f
#12 CACHED

#15 [build 4/6] COPY ./packages/stripe ./packages/stripe
#15 sha256:4a67860caa69bc9c2b395a4fa7c248b69792e24ecd91909baf163c76e245fb9c
#15 CACHED

#16 [build 5/6] RUN npm ci --workspace=stripe-api --cache /tmp/empty-cache
#16 sha256:30e5e266de4a48a830877aa20024cf46d6d07a001d5f67aa6f42c5c56935685d
#16 CACHED

#13 [stage-1 4/6] COPY ./packages/stripe/package.json ./packages/stripe/
#13 sha256:8e1b942f213a7bda0c2d5450c2a9aa1b6fa57fd3502b20a080f85e4826bac2e4
#13 CACHED

#17 [build 6/6] RUN npm run build:ts --workspace=stripe-api
#17 sha256:4d1d24eef06000c5602e48d2601ef952482a57e2f7fee84d93e49c32c6c68f93
#17 ...

#14 [stage-1 5/6] RUN npm ci --omit=dev --workspace=stripe-api --cache /tmp/empty-cache
#14 sha256:f69adf6e035fc3fa1f814c05302ded3e88bf71d69cf92f8b6cfebfff96e9c02b
#14 CACHED

#17 [build 6/6] RUN npm run build:ts --workspace=stripe-api
#17 sha256:4d1d24eef06000c5602e48d2601ef952482a57e2f7fee84d93e49c32c6c68f93
#17 0.882 
#17 0.882 > stripe-api@1.0.0 build:ts
#17 0.882 > tsc
#17 0.882 
#17 3.313 src/plugins/stripe.ts:12:65 - error TS2322: Type '"2022-11-15"' is not assignable to type '"2023-08-16"'.
#17 3.313 
#17 3.313 12       fastify.decorate("stripe", new Stripe(config.secretKey, { apiVersion: "2022-11-15" }));
#17 3.313                                                                    ~~~~~~~~~~
#17 3.313 
#17 3.313   ../../node_modules/stripe/types/lib.d.ts:47:7
#17 3.313     47       apiVersion: LatestApiVersion;
#17 3.313              ~~~~~~~~~~
#17 3.313     The expected type comes from property 'apiVersion' which is declared here on type 'StripeConfig'
#17 3.313 
#17 3.314 
#17 3.314 Found 1 error in src/plugins/stripe.ts:12
#17 3.314 
#17 3.334 npm ERR! Lifecycle script `build:ts` failed with error: 
#17 3.334 npm ERR! Error: command failed 
#17 3.334 npm ERR!   in workspace: stripe-api@1.0.0 
#17 3.334 npm ERR!   at location: /app/packages/stripe 
#17 3.335 npm notice 
#17 3.335 npm notice New major version of npm available! 9.8.1 -> 10.2.3
#17 3.335 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.3>
#17 3.335 npm notice Run `npm install -g npm@10.2.3` to update!
#17 3.335 npm notice 
#17 ERROR: executor failed running [/bin/sh -c npm run build:ts --workspace=stripe-api]: exit code: 1
------
 > [build 6/6] RUN npm run build:ts --workspace=stripe-api:
------
executor failed running [/bin/sh -c npm run build:ts --workspace=stripe-api]: exit code: 1