Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

issues with cdk deploy and running into spawnSync docker ENOENT #1

Closed
imjcham opened this issue Mar 18, 2023 · 4 comments
Closed

issues with cdk deploy and running into spawnSync docker ENOENT #1

imjcham opened this issue Mar 18, 2023 · 4 comments

Comments

@imjcham
Copy link

imjcham commented Mar 18, 2023

Great blog and fun idea -- when following the commands to set up the environment, after running npm run deploy I get the following error:

aws-serverless-ai-stories@1.0.0 deploy
cd backend && cdk deploy --all

Error: spawnSync docker ENOENT
at Object.spawnSync (node:internal/child_process:1117:20)
at Object.spawnSync (node:child_process:871:24)
at Object.dockerExec (/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/core/lib/private/asset-staging.js:1:3313)
at Function.fromBuild (/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/core/lib/bundling.js:1:3962)
at new Bundling (/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.js:1:1944)
at Function.bundle (/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.js:1:3046)
at new NodejsFunction (/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.js:1:1229)
at new BackendStack (/Users/aws/aws-serverless-ai-stories/backend/lib/backend.ts:60:45)
at Object. (/Users/aws/aws-serverless-ai-stories/backend/bin/backend.ts:20:1)
at Module._compile (node:internal/modules/cjs/loader:1275:14) {
errno: -2,
code: 'ENOENT',
syscall: 'spawnSync docker',
path: 'docker',
spawnargs: [
'build',
'-t',
'cdk-84e5538a8e2f550e0f75cd28a4bc048301af951bab38cd4ded047a33760a5a26',
'--platform',
'linux/amd64',
'--build-arg',
'IMAGE=public.ecr.aws/sam/build-nodejs18.x',
'--build-arg',
'ESBUILD_VERSION=0',
'/Users/aws/aws-serverless-ai-stories/backend/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib'
]
}

Subprocess exited with error 1

I also notice that when I run anything with CDK, such as cdk metadata or cdk ls I get the same error.

@mmuller88
Copy link
Contributor

are you might using a mac arm ? You need to adjust the platform in frontend.ts

@imjcham
Copy link
Author

imjcham commented Mar 30, 2023

thanks - will try that

@boyney123
Copy link
Contributor

@imjcham did that work for you?

@boyney123
Copy link
Contributor

Going to close for now, feel free to re-open if you still have issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants