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

Constructs dependency is not supporting Node 12.x #1109

Closed
RobertDurcansky opened this issue Jun 10, 2022 · 6 comments
Closed

Constructs dependency is not supporting Node 12.x #1109

RobertDurcansky opened this issue Jun 10, 2022 · 6 comments

Comments

@RobertDurcansky
Copy link

RobertDurcansky commented Jun 10, 2022

Dear dev team,
we are currently facing the issue with Constructs library on our project. One of our projects is running on Node 12.x and since 9th of June 2022 we are having troubles with Constructs library. Many AWS libraries have transient dependency to your Constructs package. Unfortunatelly a day ago one of your dependencies introduced backward not compatible breaking change in minor version. If we are right the issue is in your dev-dependency "jsii": "^1.60.0". They have published 1.60.0 version with following words: "Beginning with this release, jsii packages no longer support node 12." (https://github.com/aws/jsii/releases/tag/v1.60.0). As far as we know AWS-CDK in version 1.159.0 should support Node 12.x but it seems like issue right now. Can you verify the issue, please?

Current issue:

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

    SyntaxError: Unexpected token '?'

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
      at Object.<anonymous> (node_modules/constructs/src/index.ts:2:1)
@AlexStasko
Copy link

AlexStasko commented Jun 10, 2022

Faced with the same issue. Even though new version was released with "jsii": "^1.60.1".
Currently, we have to pin version of constructs lib to 3.4.31.

@Chriscbr
Copy link
Contributor

We are not actively supporting Node 12.x in new versions of constructs since Node v12 is past its end of life date, and is no longer receiving security updates, so we can't provide a guarantee of patching security issues.

If you are unable to update to a supported version of node, it should still be possible to pin constructs to an older version that is compatible with node v12 as @AlexStasko mentioned, or pin to an older version of jsii.

AWS CDK v1 is now in maintenance mode (more details) so we recommend folks to upgrade applications and libraries to AWS CDK v2.

@wchaws
Copy link

wchaws commented Jun 13, 2022

Upgrade to Node 14.x will fix this issue

@rudpot
Copy link

rudpot commented Jun 14, 2022

Unfortunately there are places where it's very hard to update to a recent version of node. Most notably CodeBuild where "latest" == 12, "14" is unavailable despite it being mentioned in the documentation and "16" having a partial chance of existing.

@macrozone
Copy link

this package introduced a breaking change without bumping the major version, which will now have a cascading effect on all packages that depend on this one.

constructs 3.x went from node 10 to now require node 14, without bumping the major version.

This is a very bad practise.

We should be thankfull that lock-files exists to mitigate the consequences of such a misstakes

@mrgrain
Copy link
Contributor

mrgrain commented Oct 10, 2024

I agree that changing a node version requirement should normally include a major version bump. Constructs 3.x is EOS so this won't be addressed anymore.

@mrgrain mrgrain closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants