Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cdk synth): (Unexpected token '?' Subprocess exited with error 1) #20681

Closed
KARTHIKEYANBALAKRISHNAN opened this issue Jun 9, 2022 · 5 comments
Assignees
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@KARTHIKEYANBALAKRISHNAN
Copy link

Describe the bug

Cdk synthesize fails with the following error.

Unexpected token '?'
Subprocess exited with error 1
Error: Subprocess exited with error 1
at ChildProcess. (/opt/atlassian/pipelines/agent/build/cdk/node_modules/aws-cdk/lib/api/cxapp/exec.ts:122:23)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)

Expected Behavior

Cdk synth should succeed

Current Behavior

errors out -
Unexpected token '?'
Subprocess exited with error 1
Error: Subprocess exited with error 1
at ChildProcess. (/opt/atlassian/pipelines/agent/build/cdk/node_modules/aws-cdk/lib/api/cxapp/exec.ts:122:23)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)

Reproduction Steps

npm run cdk synth -- --verbose

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

1.87.0

Framework Version

No response

Node.js Version

12.22.12

OS

Alpine

Language

Typescript

Language Version

4.1.2

Other information

Related issue (#20678)

@KARTHIKEYANBALAKRISHNAN KARTHIKEYANBALAKRISHNAN added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 9, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jun 9, 2022
@traviswalker26
Copy link

I think this is related to the release of constructs https://github.com/aws/constructs/releases/tag/v3.4.32. A proprietary tool I'm using is giving me this error:

/usr/local/lib/node_modules/deployer/node_modules/constructs/lib/construct.js:501
const nodeFactory = options.nodeFactory ?? { createNode: (host, nodeScope, nodeId) => new Node(host, nodeScope, nodeId) };

SyntaxError: Unexpected token '?'

I'm also using node 12.22.12.

@Andyruu
Copy link

Andyruu commented Jun 9, 2022

Upgrading to latest node version resolved this for us.

@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Jun 9, 2022
@peterwoodworth
Copy link
Contributor

This should be fixed in the latest jsii release, let me know https://github.com/aws/jsii/releases/tag/v1.60.1

@peterwoodworth peterwoodworth added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 9, 2022
@KARTHIKEYANBALAKRISHNAN
Copy link
Author

This should be fixed in the latest jsii release, let me know https://github.com/aws/jsii/releases/tag/v1.60.1

Got it. That would fix the issue. For now, we went with Node18 upgrade. Thanks.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

5 participants