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

BUG: Broken makesetup command , node prerequisite not satisfied in Ubuntu 22.04 and other distribs #132

Open
bgauchon-reply opened this issue Jun 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bgauchon-reply
Copy link
Contributor

NB : Node 14 is deprecated, code should be updated for node >= 22 ref

Context
pip 22.0.2
python3.10
aws_cdk_lib-2.146.0-py3-none-any.whl
boto3-1.34.127-py3-none-any.whl

npm install -g aws-cdk
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>= 14.15.0' },
npm WARN EBADENGINE   current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }

cdk --version
	SyntaxError: Unexpected token '?'
		at wrapSafe (internal/modules/cjs/loader.js:915:16)
		at Module._compile (internal/modules/cjs/loader.js:963:27)
		at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
		at Module.load (internal/modules/cjs/loader.js:863:32)
		at Function.Module._load (internal/modules/cjs/loader.js:708:14)
		at Module.require (internal/modules/cjs/loader.js:887:19)
		at require (internal/modules/cjs/helpers.js:85:18)
		at Object.<anonymous> (/usr/local/lib/node_modules/aws-cdk/bin/cdk.js:3:15)
		at Module._compile (internal/modules/cjs/loader.js:999:30)
		at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
	make: *** [Makefile:77: setup-cdk] Error 1

TEMP solution : manually update for node 14, which is deprecated and require to remove manually libnode as dependancy fails

sudo apt-get purge nodejs libnode*
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt -y install nodejs
make setup
...
npm install -g aws-cdk --force
npm WARN using --force I sure hope you know what you are doing.
/usr/bin/cdk -> /usr/lib/node_modules/aws-cdk/bin/cdk
+ [email protected]
added 2 packages from 6 contributors in 1.608s
cdk --version
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!                                                                            !!
!!  Node 14 has reached end-of-life on 2023-04-30 and is not supported.       !!
!!  Please upgrade to a supported node version as soon as possible.           !!
!!                                                                            !!
!!  This software is currently running on node v14.21.3.                      !!
!!  As of the current release of this software, supported node releases are:  !!
!!  - ^22.0.0 (Planned end-of-life: 2027-04-30)                               !!
!!  - ^20.0.0 (Planned end-of-life: 2026-04-30)                               !!
!!  - ^18.0.0 (Planned end-of-life: 2025-04-30)                               !!
!!                                                                            !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2.146.0 (build b368c78)
...
@bgauchon-reply bgauchon-reply added the bug Something isn't working label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants