ps-serverless-app
ps-serverless-app copied to clipboard
Issue deploying the p2 branch: `EACCES: permission denied, unlink '/asset-input/webapp/build/favicon.ico'`
I am getting the following permissions issue when running npx cdk deploy
on the p2 branch. I am running into a permissions error:
lrobbins@arucard:~/learning/aws/ps-serverless-app/infrastructure (p2) $ npx cdk deploy
Bundling asset ApplicationStack/WebApp/WebAppDeploy/WebAppDeploy/Asset1/Stage...
yarn run v1.22.19
$ react-scripts build
Failed to compile.
EACCES: permission denied, unlink '/asset-input/webapp/build/favicon.ico'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/asset-staging.ts:478
throw new Error(`Failed to bundle asset ${this.node.path}, bundle output is located at ${bundleErrorDir}: ${err}`);
^
Error: Failed to bundle asset ApplicationStack/WebApp/WebAppDeploy/WebAppDeploy/Asset1/Stage, bundle output is located at /home/lrobbins/learning/aws/ps-serverless-app/infrastructure/cdk.out/asset.b9fc501666ca534257b3491fb4db2cef743ff767aa2adffcf0df33a11ba34441-error: Error: docker exited with status 1
at AssetStaging.bundle (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/asset-staging.ts:478:13)
at AssetStaging.stageByBundling (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/asset-staging.ts:326:10)
at stageThisAsset (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/asset-staging.ts:192:35)
at Cache.obtain (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/private/cache.ts:24:13)
at new AssetStaging (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/core/lib/asset-staging.ts:217:44)
at new Asset (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/aws-s3-assets/lib/asset.ts:134:21)
at Object.bind (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/aws-s3-deployment/lib/source.ts:108:23)
at /home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts:327:83
at Array.map (<anonymous>)
at new BucketDeployment (/home/lrobbins/learning/aws/ps-serverless-app/node_modules/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts:327:51)
Subprocess exited with error 1
After doing a web search. I found this and made sure the NPM_CONFIG_PREFIX
was set correctly according to the guide on the NPM docs and I've confirmed that the npm config is now correct.
lrobbins@arucard:~ $ npm -v
10.2.5
lrobbins@arucard:~ $ node -v
v18.18.2
lrobbins@arucard:~ $ npm config list
; "user" config from /home/lrobbins/.npmrc
; prefix = "/home/lrobbins/.npm-global" ; overridden by env
; "env" config from environment
prefix = "/home/lrobbins/.npm-global"
; node bin location = /usr/bin/node
; node version = v18.18.2
; npm local prefix = /home/lrobbins
; npm version = 10.2.5
; cwd = /home/lrobbins
; HOME = /home/lrobbins
; Run `npm config ls -l` to show all defaults.
Unfortunately this made no difference.