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

Docker image needs node update for version 1.0.13 #544

Closed
jim-barber-he opened this issue Jan 29, 2024 · 0 comments · Fixed by #545
Closed

Docker image needs node update for version 1.0.13 #544

jim-barber-he opened this issue Jan 29, 2024 · 0 comments · Fixed by #545

Comments

@jim-barber-he
Copy link

Subject of the issue

Currently the Docker image for version 1.0.13 throws the following error when invoked no matter what parameters you pass the org-formation command:

/usr/local/lib/node_modules/aws-organization-formation/node_modules/@aws-sdk/client-iam/dist-cjs/index.js:307
    useDualstackEndpoint: options.useDualstackEndpoint ?? false,
                                                        ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:1053:16)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/aws-organization-formation/dist/src/util/aws-util.js:32:22)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)

It is because the Dockerfile that builds the image is still using node version 12.

$ grep FROM Dockerfile 
FROM        node:12.18-alpine3.11

I edited the Dockerfile and set that line to

FROM        node:18-alpine

Then rebuilt a local image and used that, and everything was fine.

Your environment

Not really relevant since it is the Docker image that is broken.
Running org-formation directly from my PC works fine.

Steps to reproduce

Tell us how to reproduce this issue. Please provide ofn projct files if possible,
you can use this template as a base.
https://plnkr.co/edit/m568SDw2KPufQsUl

I can simply try to run the help command for org-formation via its docker image like so:

docker run --rm -it orgformation/org-formation-cli:1.0.13 help

Expected behaviour

No errors

Actual behaviour

Totally broken :)

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

Successfully merging a pull request may close this issue.

1 participant