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

cloud-assembly-schema: incompatible version of Node.js #31237

Closed
1 task
sakurai-ryo opened this issue Aug 28, 2024 · 4 comments
Closed
1 task

cloud-assembly-schema: incompatible version of Node.js #31237

sakurai-ryo opened this issue Aug 28, 2024 · 4 comments
Labels
@aws-cdk/cloud-assembly-schema bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@sakurai-ryo
Copy link
Contributor

Describe the bug

Hi Team,

After this PR was merged, the aws-cdk-lib now uses the cloud-assembly-schema that was externally published.
#31064

Previously, >= 14.15.0 was specified in engines in package.json, but now >= 18.18.0 is specified and the compatible version was updated.

Before:

Now:

  "engines": {
    "node": ">= 18.18.0"
  },

https://github.com/cdklabs/cloud-assembly-schema/blob/7468c327aa0b0ef46c4b971ac36278ef57fb2b8b/package.json#L81

This may cause errors when installing or updating aws-cdk-lib if you are using a version of Node.js lower than 18.18.0.
You can ignore Node.js version compatibility with the --ignore-engines option in yarn, but this is a something to avoid if at all possible.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

v2.154.1

Expected Behavior

The installation and upgrade of aws-cdk-lib should work without errors or warnings.

Current Behavior

In the case of yarn, you will get the following error.
error @aws-cdk/cloud-assembly-schema@36.0.19: The engine "node" is incompatible with this module. Expected version ">= 18.18.0". Got "18.17.0"

Reproduction Steps

Using a version of Node.js lower than 18.18.0, execute the following command.

$ yarn add aws-cdk-lib@2.154.1

Possible Solution

If there is no obvious reason to require a version higher than 18.18.0, specify >= 14.15.0 for engins, as with aws-cdk-lib.

Additional Information/Context

No response

CDK CLI Version

v2.154.1

Framework Version

v2.154.1

Node.js Version

18.17.0

OS

macos

Language

TypeScript

Language Version

No response

Other information

No response

@sakurai-ryo sakurai-ryo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 28, 2024
@ashishdhingra ashishdhingra self-assigned this Aug 28, 2024
@ashishdhingra ashishdhingra added p2 needs-reproduction This issue needs reproduction. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 28, 2024
@ashishdhingra
Copy link
Contributor

ashishdhingra commented Aug 29, 2024

Reproducible.

Tested on OSX:

  • Install node using command brew install node@16.
    • Add node to PATH using command echo 'export PATH="/opt/homebrew/opt/node@16/bin:$PATH"' >> ~/.zshrc.
  • In a CDK project, try executing yarn add aws-cdk-lib@2.154.1

Output:

[1/4] 🔍  Resolving packages...
warning jest > jest-cli > jest-config > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > jest-runtime > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning jest > @jest/core > @jest/reporters > glob@7.2.3: Glob versions prior to v9 are no longer supported
warning jest > jest-cli > jest-config > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning jest > @jest/core > @jest/transform > babel-plugin-istanbul > test-exclude > glob@7.2.3: Glob versions prior to v9 are no longer supported
[2/4] 🚚  Fetching packages...
error @aws-cdk/cloud-assembly-schema@36.0.20: The engine "node" is incompatible with this module. Expected version ">= 18.18.0". Got "16.20.2"
error Found incompatible module.

@ashishdhingra ashishdhingra added effort/small Small work item – less than a day of effort and removed needs-reproduction This issue needs reproduction. labels Aug 29, 2024
@ashishdhingra ashishdhingra removed their assignment Aug 29, 2024
@sakurai-ryo
Copy link
Contributor Author

@ashishdhingra
I think this issue needs to be discussed by the core team, is it OK if I leave it to you?

@sakurai-ryo
Copy link
Contributor Author

This issue was fixed. cdklabs/cloud-assembly-schema#59

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/cloud-assembly-schema bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

2 participants