Constructs dependency is not supporting Node 12.x
See original GitHub issueDear 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)
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:5 (1 by maintainers)
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
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.