-
Notifications
You must be signed in to change notification settings - Fork 341
snyk-cli/1.1297.0 package update #53299
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
Conversation
octo-sts
bot
commented
May 14, 2025
Signed-off-by: wolfi-bot <[email protected]>
13ec9d0
to
1f5e8f5
Compare
📦 Build Failed: Missing Dependency
Build Details
Root Cause Analysis 🔍The build is failing because it can't find the '@snyk/fix' module that it depends on. The error occurs during the webpack bundling process. The build step 'npm run build-cli:prod' is failing because webpack cannot resolve the '@snyk/fix' dependency in the 'src/cli/commands/fix' directory, despite it appearing to be included in the workspace packages earlier in the build process. 🔍 Build failure fix suggestionsFound similar build failures that have been fixed in the past and analyzed them to suggest a fix: Suggested ChangesFile: package.yaml
Replacement:
Content:
File: package.yaml
Replacement:
Content:
Click to expand fix analysisAnalysisThe build is failing during the webpack bundling process because it can't find the '@snyk/fix' module. This is a dependency resolution issue during the webpack build process. The error specifically occurs in the Looking at the Melange YAML and build process, I notice a few key issues:
Click to expand fix explanationExplanationThe error "Module not found: Error: Can't resolve '@snyk/fix' in '/home/build/src/cli/commands/fix'" indicates that during the webpack bundling process, the build system can't find a dependency called '@snyk/fix' that is required by the code in the 'src/cli/commands/fix' directory. This is a common issue in Node.js projects, especially those with workspaces or monorepo setups, where dependencies need to be properly installed and potentially built before the main application can be built. The suggested fix adds an In the Snyk CLI repository, '@snyk/fix' is likely an internal package within the monorepo that needs to be properly linked or built before the main webpack build can reference it. By running If the '@snyk/fix' package requires a build step of its own (which is common for TypeScript packages), we also offer an alternative approach that explicitly builds this package before the main build process. The 'make build' command may already include dependency installation steps, but since we're seeing this specific error, it suggests that this step might be missing or failing. Adding an explicit installation step before running 'make build' ensures that all prerequisites are met. Click to expand alternative approachesAlternative Approaches
Was this comment helpful? Please use 👍 or 👎 reactions on this comment. |
1f5e8f5
to
8aeb7db
Compare
Signed-off-by: Batuhan Apaydin <[email protected]>
8aeb7db
to
6ab336e
Compare
The build is failing with the following error: INFO 🔗 ERROR in /home/build/src/cli/commands/fix/index.ts pkg=snyk-cli arch=arm64
INFO 🔗 ./src/cli/commands/fix/index.ts 2:25-36 pkg=snyk-cli arch=arm64
INFO 🔗 [tsl] ERROR in /home/build/src/cli/commands/fix/index.ts(2,26) pkg=snyk-cli arch=arm64
INFO 🔗 TS2307: Cannot find module '@snyk/fix' or its corresponding type declarations. pkg=snyk-cli arch=arm64
INFO 🔗 @ ./src/cli/commands/index.js 18:37-52 pkg=snyk-cli arch=arm64
INFO 🔗 @ ./src/cli/args.ts 87:16-37 pkg=snyk-cli arch=arm64
INFO 🔗 @ ./src/cli/main.ts 8:15-32 pkg=snyk-cli arch=arm64
INFO 🔗 @ ./src/cli/index.ts 13:56-73 pkg=snyk-cli arch=arm64 but I confirmed that build was succeeded with the previous version 1.1296.2 🫠 |
I reproduced the same problem on upstream as well: $ make local-wolfi
$ apk add bash make go git npm nodejs-18 python3 make
$ git clone https://github.com/snyk/cli -b v1.1297.0
$ cd cli
$ make build
ERROR in /work/cli/src/cli/commands/fix/convert-legacy-tests-results-to-fix-entities.ts
./src/cli/commands/fix/convert-legacy-tests-results-to-fix-entities.ts 6:28-39
[tsl] ERROR in /work/cli/src/cli/commands/fix/convert-legacy-tests-results-to-fix-entities.ts(6,29)
TS2307: Cannot find module '@snyk/fix' or its corresponding type declarations.
@ ./src/cli/commands/fix/index.ts 8:55-112
@ ./src/cli/commands/index.js 18:37-52
@ ./src/cli/args.ts 87:16-37
@ ./src/cli/main.ts 8:15-32
@ ./src/cli/index.ts 13:56-73
ERROR in /work/cli/src/cli/commands/fix/index.ts
./src/cli/commands/fix/index.ts 2:25-36
[tsl] ERROR in /work/cli/src/cli/commands/fix/index.ts(2,26)
TS2307: Cannot find module '@snyk/fix' or its corresponding type declarations.
@ ./src/cli/commands/index.js 18:37-52
@ ./src/cli/args.ts 87:16-37
@ ./src/cli/main.ts 8:15-32
@ ./src/cli/index.ts 13:56-73 |
superseded by #53532 |