snyk-tech-services / snyk-delta

Other
18 stars 18 forks source link

Since v1.12.1 axios issue is beign thrown #190

Open ronanbrowne opened 6 days ago

ronanbrowne commented 6 days ago

Since the last release, v1.12.1, the following issue has been observed in our pipelines.

[2024-10-10T10:56:04.841Z] + + snyk-linux test --configuration-matching=^((?!test).)*$ --file=platform-test/build.gradle --policy-path=.snyk --severity-threshold=high --json
[2024-10-10T10:56:04.841Z] snyk-delta -d --baselineOrg **** --baselineProject <ID REMOVED>
[2024-10-10T10:56:04.841Z] Error: Cannot find module '/snapshot/project/node_modules/snyk-request-manager/node_modules/axios/dist/node/axios.cjs'
[2024-10-10T10:56:04.842Z] 1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
[2024-10-10T10:56:04.842Z]     at createEsmNotFoundErr (internal/modules/cjs/loader.js:842:15)
[2024-10-10T10:56:04.842Z]     at finalizeEsmResolution (internal/modules/cjs/loader.js:835:15)
[2024-10-10T10:56:04.842Z]     at resolveExports (internal/modules/cjs/loader.js:424:14)
[2024-10-10T10:56:04.842Z]     at Function.Module._findPath (internal/modules/cjs/loader.js:464:31)
[2024-10-10T10:56:04.842Z]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:802:27)
[2024-10-10T10:56:04.842Z]     at Function._resolveFilename (pkg/prelude/bootstrap.js:1951:46)
[2024-10-10T10:56:04.842Z]     at Function.Module._load (internal/modules/cjs/loader.js:667:27)
[2024-10-10T10:56:04.842Z]     at Module.require (internal/modules/cjs/loader.js:887:19)
[2024-10-10T10:56:04.842Z]     at Module.require (pkg/prelude/bootstrap.js:1851:31)
[2024-10-10T10:56:04.842Z]     at require (internal/modules/cjs/helpers.js:74:18)
script returned exit code 1

I can see from the change log that Axios has been updated which is referenced in this same stack trace. Can this please be investigated please?

ronanbrowne commented 6 days ago

FYI @aarlaud any advice on this, in the mean time I'm going to roll back to previous version to unblock.

aarlaud commented 6 days ago

What's your node version? Note able to reproduce that on my end.

ronanbrowne commented 6 days ago

What's your node version?

v18.20.4

aarlaud commented 6 days ago

are you using the binary?

ronanbrowne commented 6 days ago

are you using the binary?

Yes, for additional context, in our use case this tool executes in a docker image, the building of the image installs the binary grabbing it form the GH release page via a curl (getting the lastest version for the specified architecture)

aarlaud commented 6 days ago

problem is with the binary indeed. investigating

aarlaud commented 6 days ago

1.12.2 should do the trick. At least it does for me. Please confirm whenever you get the chance. Thanks for reporting this and apologies for the inconvenience. Cheers!

ronanbrowne commented 6 days ago

Much appreciated @aarlaud - I'll confirm this tomorrow and loop back