Docker alpine dependency?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- aws, docker, typescript
- Domain
- build-system, cloud
Research direction
The issue names Cloud9, Docker, esbuild, and the cdk deploy command but no project source file or test. Start by reproducing cdk deploy on a fresh Cloud9 instance and inspect the bundling failure; done means the asset bundles successfully and deployment completes without the missing esbuild error.
Written by the indexing model from the issue text.
Description
Hello,
Thanks so much for putting together this sample. I am trying to deploy on a fresh Cloud9 instance, and cdk deploy is bombing on the esbuild step. Suggestions for getting over this hurdle? Stack is below.
Step 13/13 : CMD [ "esbuild" ]
---> Using cache
---> 3fcfc461ced5
Successfully built 3fcfc461ced5
Successfully tagged cdk-bbcea2a50b8f6765844d66b3c00cbcc5065e43223302af8fb64e1148037d29f5:latest
Bundling asset BookStack/frontend/FrontendAppDeploy/Asset1/Stage...
/bin/sh: esbuild: command not found
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
96526aa774ef: Pull complete
Digest: sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
Status: Downloaded newer image for alpine:latest
Docker build not supported. Please install esbuild.
/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/asset-staging.js:2
`),localBundling=options.local?.tryBundle(bundleDir,options),!localBundling){const assetStagingOptions={sourcePath:this.sourcePath,bundleDir,...options};switch(options.bundlingFileAccess){case bundling_1.BundlingFileAccess.VOLUME_COPY:new asset_staging_1.AssetBundlingVolumeCopy(assetStagingOptions).run();break;case bundling_1.BundlingFileAccess.BIND_MOUNT:default:new asset_staging_1.AssetBundlingBindMount(assetStagingOptions).run();break}}}catch(err){const bundleErrorDir=bundleDir+"-error";throw fs.existsSync(bundleErrorDir)&&fs.removeSync(bundleErrorDir),fs.renameSync(bundleDir,bundleErrorDir),new Error(`Failed to bundle asset ${this.node.path}, bundle output is located at ${bundleErrorDir}: ${err}`)}if(fs_1.FileSystem.isEmpty(bundleDir)){const outputDir=localBundling?bundleDir:AssetStaging.BUNDLING_OUTPUT_DIR;throw new Error(`Bundling did not produce any output. Check that content is written to ${outputDir}.`)}}calculateHash(hashType,bundling,outputDir){if(hashType==assets_1.AssetHashType.CUSTOM||hashType==assets_1.AssetHashType.SOURCE&&bundling){const hash=crypto.createHash("sha256");return hash.update(this.customSourceFingerprint??fs_1.FileSystem.fingerprint(this.sourcePath,this.fingerprintOptions)),bundling&&hash.update(JSON.stringify(bundling)),hash.digest("hex")}switch(hashType){case assets_1.AssetHashType.SOURCE:return fs_1.FileSystem.fingerprint(this.sourcePath,this.fingerprintOptions);case assets_1.AssetHashType.BUNDLE:case assets_1.AssetHashType.OUTPUT:if(!outputDir)throw new Error(`Cannot use \`${hashType}\` hash type when \`bundling\` is not specified.`);return fs_1.FileSystem.fingerprint(outputDir,this.fingerprintOptions);default:throw new Error("Unknown asset hash type.")}}}exports.AssetStaging=AssetStaging,_a=JSII_RTTI_SYMBOL_1,AssetStaging[_a]={fqn:"aws-cdk-lib.AssetStaging",version:"2.92.0"},AssetStaging.BUNDLING_INPUT_DIR="/asset-input",AssetStaging.BUNDLING_OUTPUT_DIR="/asset-output",AssetStaging.assetCache=new cache_1.Cache;function renderAssetFilename(assetHash,extension=""){return`asset.${assetHash}${extension}`}function determineHashType(assetHashType,customSourceFingerprint){const hashType=customSourceFingerprint?assetHashType??assets_1.AssetHashType.CUSTOM:assetHashType??assets_1.AssetHashType.SOURCE;if(customSourceFingerprint&&hashType!==assets_1.AssetHashType.CUSTOM)throw new Error(`Cannot specify \`${assetHashType}\` for \`assetHashType\` when \`assetHash\` is specified. Use \`CUSTOM\` or leave \`undefined\`.`);if(hashType===assets_1.AssetHashType.CUSTOM&&!customSourceFingerprint)throw new Error("`assetHash` must be specified when `assetHashType` is set to `AssetHashType.CUSTOM`.");return hashType}function calculateCacheKey(props){return crypto.createHash("sha256").update(JSON.stringify(sortObject(props))).digest("hex")}function sortObject(object){if(typeof object!="object"||object instanceof Array)return object;const ret={};for(const key of Object.keys(object).sort())ret[key]=sortObject(object[key]);return ret}function singleArchiveFile(directory){if(!fs.existsSync(directory))throw new Error(`Directory ${directory} does not exist.`);if(!fs.statSync(directory).isDirectory())throw new Error(`${directory} is not a directory.`);const content=fs.readdirSync(directory);if(content.length===1){const file=path.join(directory,content[0]),extension=getExtension(content[0]).toLowerCase();if(fs.statSync(file).isFile()&&ARCHIVE_EXTENSIONS.includes(extension))return file}}function determineBundledAsset(bundleDir,outputType){const archiveFile=singleArchiveFile(bundleDir);switch(outputType===bundling_1.BundlingOutput.AUTO_DISCOVER&&(outputType=archiveFile?bundling_1.BundlingOutput.ARCHIVED:bundling_1.BundlingOutput.NOT_ARCHIVED),outputType){case bundling_1.BundlingOutput.NOT_ARCHIVED:return{path:bundleDir,packaging:assets_1.FileAssetPackaging.ZIP_DIRECTORY};case bundling_1.BundlingOutput.ARCHIVED:if(!archiveFile)throw new Error("Bundling output directory is expected to include only a single archive file when `output` is set to `ARCHIVED`");return{path:archiveFile,packaging:assets_1.FileAssetPackaging.FILE,extension:getExtension(archiveFile)}}}function getExtension(source){for(const ext of ARCHIVE_EXTENSIONS)if(source.toLowerCase().endsWith(ext))return ext;return path.extname(source)}
^
Error: Bundling did not produce any output. Check that content is written to /asset-output.
at AssetStaging.bundle (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/asset-staging.js:2:830)
at AssetStaging.stageByBundling (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/asset-staging.js:1:4544)
at stageThisAsset (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/asset-staging.js:1:2005)
at Cache.obtain (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/private/cache.js:1:242)
at new AssetStaging (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/core/lib/asset-staging.js:1:2400)
at new Asset (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/aws-s3-assets/lib/asset.js:1:736)
at Object.bind (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/aws-s3-deployment/lib/source.js:1:1185)
at /home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/aws-s3-deployment/lib/bucket-deployment.js:1:3096
at Array.map (<anonymous>)
at new BucketDeployment (/home/ec2-user/environment/aws-lambda-function-url-secured/node_modules/aws-cdk-lib/aws-s3-deployment/lib/bucket-deployment.js:1:3077)
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/aws-lambda-function-url-secured
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
All issues in aws-samples/aws-lambda-function-url-secured
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MystenLabs/MemWal#1085 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
📕documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
db-ux-design-system/core-web#8343 ·
Maintainers usually reply within 1 day
-
enhancement triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
heygen-com/hyperframes#4944 ·
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
linagora/twake-calendar-frontend#1493 · 1 comment ·
Maintainers usually reply within 1 day