-
Notifications
You must be signed in to change notification settings - Fork 29
Closed as not planned
Closed as not planned
Copy link
Labels
Description
According to the code it parser, it is not verifying that dependencies field is actually present in package.json, which results in exception during test / monitor
2025-08-05T12:17:13.192Z snyk:run-test getDepsFromPlugin returned failed results, cannot run test/monitor [
{
targetFile: '/Users/***/yarn.lock',
error: TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at rewriteAliasesInYarnLockV2 (/snapshot/project/dist/cli/webpack:/snyk/node_modules/snyk-nodejs-lockfile-parser/dist/aliasesPreprocessors/yarn-lock-v2.js:10:1)
at Object.parseYarnLockV2Project (/snapshot/project/dist/cli/webpack:/snyk/node_modules/snyk-nodejs-lockfile-parser/dist/dep-graph-builders/yarn-lock-v2/simple.js:13:1)
at buildDepGraph (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/nodejs-plugin/npm-lock-parser.ts:136:35)
at Object.parse (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/nodejs-plugin/npm-lock-parser.ts:66:18)
at Object.inspect (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/nodejs-plugin/index.ts:30:24)
at Object.inspect (/snapshot/project/dist/cli/webpack:/snyk/src/lib/module-info/index.ts:23:33)
at getSinglePluginResult (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/get-single-plugin-result.ts:15:64)
at Object.getMultiPluginResult [as handler] (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/get-multi-plugin-result.ts:115:53)
at getDepsFromPlugin (/snapshot/project/dist/cli/webpack:/snyk/src/lib/plugins/get-deps-from-plugin.ts:65:24)
at assembleLocalPayloads (/snapshot/project/dist/cli/webpack:/snyk/src/lib/snyk-test/run-test.ts:641:18)
at runTest (/snapshot/project/dist/cli/webpack:/snyk/src/lib/snyk-test/run-test.ts:370:22)
at test (/snapshot/project/dist/cli/webpack:/snyk/src/cli/commands/test/index.ts:160:13)
at runCommand (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:58:25)
at main (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:361:11)
at /snapshot/project/dist/cli/webpack:/snyk/src/cli/index.ts:13:3
at callHandlingUnexpectedErrors (/snapshot/project/dist/cli/webpack:/snyk/src/lib/unexpected-error.ts:43:5),
errMessage: 'Cannot convert undefined or null to object'
}
]
tarik02