Schalk Keun
Schalk Keun

Reputation: 548

Error: Cannot find module './dist-tools/transform.js' from '/opt/atlassian/pipelines/agent/build/node_modules/aws-sdk'

Hi so we have something interesting happening in our builds.

Nothing regarding the gulp build script changed from our side for one of our projects. But suddenly today when we try to do a pipeline build on one of our repositories we get the following stacktrace error:

Error: Cannot find module './dist-tools/transform.js' from '/opt/atlassian/pipelines/agent/build/node_modules/aws-sdk'    
at /opt/atlassian/pipelines/agent/build/node_modules/resolve/lib/async.js:128:35    
at load (/opt/atlassian/pipelines/agent/build/node_modules/resolve/lib/async.js:147:43)    
at onex (/opt/atlassian/pipelines/agent/build/node_modules/resolve/lib/async.js:172:17)    
at /opt/atlassian/pipelines/agent/build/node_modules/resolve/lib/async.js:13:69    
at FSReqWrap.oncomplete (fs.js:152:21)

Has anyone come accross this before? (we are using node 10.17 for our builds)

We tested the same code from our local builds and get the exact same issue. It seems that something in the aws-sdk package changed?

Since this error suddenly appeared this morning, we looked at our aws-sdk package and updated it to the latest version (2.643.0), but we still get the same error. No code that uses the aws-sdk package has changed.

Upvotes: 0

Views: 323

Answers (1)

matthopson
matthopson

Reputation: 1

Also seeing this as of this morning. I find this somewhat sus (adding dist-tools to npmignore).

https://github.com/aws/aws-sdk-js/commit/98c40e64cb7d60927c6a0cec49592fc1fcaa59d7

I wonder if pulling the package directly from GH would resolve.

UPDATE: I've got a convo going on over here about this https://github.com/aws/aws-sdk-js/issues/3159

We downgraded to the previous version and our issue went away.

Upvotes: 0

Related Questions