question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Constructs dependency is not supporting Node 12.x

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
macrozonecommented, Aug 12, 2022

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

0reactions
rudpotcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CDK docs could be clearer about Node.js dependency #291
Node.js versions 13.0.0 through 13.6.0 are not compatible with the AWS ... command-line tool) and the AWS Construct Library run on Node.js.
Read more >
Error with node-sass when running npm install - Stack Overflow
I fixed this by adding these to my devDependencies in package.json : ... nvm install 12.22.12 nvm use 12.22.12 node -v npm install...
Read more >
Solving common issues with node-gyp - LogRocket Blog
In this article, we've grouped all the major issues with node-gyp into three categories, including dependencies of node-gyp, add-on compilation ...
Read more >
Announcing the end of support for Node.js 12.x in the AWS ...
Starting November 1, 2022, AWS SDK For JavaScript (v3) will no longer support Node.js 12.x which was EOL on April 30, 2022.
Read more >
Node v16.15.1 (npm v8.11.0) breaks some builds
For others having this problem: To fix, either revert back to v16.15.0 or use npm flags. Set the env variable NPM_FLAGS to --legacy-peer-deps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found