Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Docker alpine dependency?

Ouverte
#9 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
aws, docker, typescript
Domaine
build-system, cloud

Piste de recherche

L’issue mentionne Cloud9, Docker, esbuild et la commande cdk deploy, mais aucun fichier source ni test du projet. Commencez par reproduire cdk deploy sur une instance Cloud9 fraîche et examiner l’échec du bundling ; c’est terminé lorsque l’asset est correctement bundlé et que le déploiement s’achève sans l’erreur indiquant l’absence de esbuild.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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)
Langage dominant
TypeScript
Étoiles
27
Forks
7
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de aws-samples/aws-lambda-function-url-secured

Toutes les issues de aws-samples/aws-lambda-function-url-secured

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.