Cannot find module '@aws-sdk/util-endpoints

I’ve not changed my environment in weeks yet this error has just now started showing up. Can no longer upload images to AWS s£

Running Wappler 4.9.x

{
“status”: “500”,
“code”: “MODULE_NOT_FOUND”,
“message”: “Cannot find module ‘@aws-sdk/util-endpoints’\nRequire stack:\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/index.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js”,
“stack”: “Error: Cannot find module ‘@aws-sdk/util-endpoints’\nRequire stack:\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js\n- /opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/index.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n at Module.require (internal/modules/cjs/loader.js:887:19)\n at require (internal/modules/cjs/helpers.js:74:18)\n at Object. (/opt/node_app/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js:4:26)\n at Module._compile (internal/modules/cjs/loader.js:999:30)\n at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)\n at Module.load (internal/modules/cjs/loader.js:863:32)\n at Function.Module._load (internal/modules/cjs/loader.js:708:14)\n at Module.require (internal/modules/cjs/loader.js:887:19)”
}

Just got this on my machine. Were you able to resolve this?
The same project works fine on other machine. Just on mine its giving this error.

Hi @sid,

Not able to resolve it - just happened as a previous build from a couple of weeks ago is fine.

Something in the build cycle maybe - NPM or related ? @George

Much like the recent tagify issue

I suspect this will break on everyone’s machine before long - they just might not notice

I also have this issue on any action that contains S3 steps

I’m also experiencing this issue

1 Like

Thanks. That’s confirmed it

I’m guessing we wait until there’s a fix posted by AWS - though there’s a workaround listed as:

install @aws-sdk/util-endpoints manually using npm install @aws-sdk/util-endpoints

Not sure I want to risk that !!!

Its completely safe to manually install.
Lets hope it gets fixed soon.

1 Like

This has just been fixed in the new version I changed the version in package.json to:
"@aws-sdk/client-s3": "^3.193.0",

Actions are now working for me :slight_smile:

Thanks

Not the first time they break something at the aws-sdk.

1 Like