aws-samples / aws-samples/react-ssr-lambda

Cannot find asset issue during cdk bootstrap

Open
#62 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
106
Forks
24
PR merge metrics
No merged PRs in 30d

Description

Hello team!

Encountering the below error during the cdk bootstrap step. Not sure if this is a new issue. Help appreciated. Thanks

cd react-ssr-lambda
cd ./cdk
npm install
npm run build
cdk bootstrap - failed here

Error: Cannot find asset at /home/gss/myprojects/react-ssr-lambda/simple-ssr/build
at new AssetStaging (/home/gss/myprojects/react-ssr-lambda/cdk/node_modules/aws-cdk-lib/core/lib/asset-staging.js:1:1402)
at new Asset (/home/gss/myprojects/react-ssr-lambda/cdk/node_modules/aws-cdk-lib/aws-s3-assets/lib/asset.js:1:736)
at Object.bind (/home/gss/myprojects/react-ssr-lambda/cdk/node_modules/aws-cdk-lib/aws-s3-deployment/lib/source.js:1:1185)
at /home/gss/myprojects/react-ssr-lambda/cdk/node_modules/aws-cdk-lib/aws-s3-deployment/lib/bucket-deployment.js:1:3013
at Array.map ()
at new BucketDeployment (/home/gss/myprojects/react-ssr-lambda/cdk/node_modules/aws-cdk-lib/aws-s3-deployment/lib/bucket-deployment.js:1:2994)
at new SsrStack (/home/gss/myprojects/react-ssr-lambda/cdk/lib/srr-stack.ts:44:5)
at Object. (/home/gss/myprojects/react-ssr-lambda/cdk/bin/cdk.ts:13:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module.m._compile (/home/gss/myprojects/react-ssr-lambda/cdk/node_modules/ts-node/src/index.ts:1618:23)

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported steps from the repository root, including npm run build, then inspect cdk/lib/srr-stack.ts at line 44 and cdk/bin/cdk.ts at line 13 where the missing asset is referenced. Compare the expected build output with /simple-ssr/build and run cdk bootstrap again; done means bootstrap no longer fails with the missing-asset error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, node.js, react, typescript
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.