ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
212 stars 37 forks source link

gsts v.5.0.0 missing files #85

Closed gregbarski closed 1 year ago

gregbarski commented 1 year ago

The is a problem running following command on version 5.0.0 on Windows 11

PS C:\Windows\System32> gsts --sp-id 9********2 --idp-id *********** --username [*********@****.**]--aws-profile default --force --verbose --clean
file:///C:/Users/*****************/AppData/Roaming/npm/node_modules/gsts/credentials-manager.js:11
import { chmod, mkdir, readFile, writeFile, constants } from 'node:fs/promises';
                                            ^^^^^^^^^
SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'constants'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:104:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:149:5)
    at async Loader.import (internal/modules/esm/loader.js:177:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)

gsts version 5.0.0 node version v14.17.0 or latest 19.6.1

Not sure whether it is a local problem or not really.

ruimarinho commented 1 year ago

Hi, you'll need to upgrade you node version to at least v18 (you're on v14). Cheers.

gregbarski commented 1 year ago

I got version 19.6.1

ruimarinho commented 1 year ago

It might be installed but that's not the one in use though. Make sure node -v is reporting the right version.