profile
viewpoint

Ask questionsnpm_and_yarn crashing with Azure DevOps

Trying to get a Dependabot instance set up for Azure DevOps. I was first seeing this problem with running dependabot-script, and now I'm seeing it when pulling down all of dependabot-core and having dry-run.rb hardcoded to point at the Azure DevOps repo.

I'm not sure if it means anything, but I have an empty .npmrc file.

Attached the console output from the dry run script below. I get an identical error with update.rb from dependabot-script. Any ideas on how to go about debugging this?

➜ bin/dry-run.rb npm_and_yarn null
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.4-compliant syntax, but you are running 2.6.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
=> fetching dependency files
=> dumping fetched dependency files: ./dry-run/null
=> parsing dependency files
=> updating 85 dependencies

=== @angular/animations (8.2.0)
 => checking for updates
 => requirements to unlock own
 => updating to 8.2.4
Traceback (most recent call last):
        25: from bin/dry-run.rb:272:in `<main>'
        24: from bin/dry-run.rb:272:in `each'
        23: from bin/dry-run.rb:323:in `block in <main>'
        22: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:39:in `updated_dependency_files'
        21: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:148:in `updated_lockfiles'
        20: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:148:in `each'
        19: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:149:in `block in updated_lockfiles'
        18: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:120:in `package_lock_changed?'
        17: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:187:in `updated_package_lock_content'
        16: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:30:in `updated_lockfile_content'
        15: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:34:in `in_a_temporary_directory'
        14: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
        13: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `block in in_a_temporary_directory'
        12: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `chdir'
        11: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `block (2 levels) in in_a_temporary_directory'
        10: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:34:in `block in updated_lockfile_content'
         9: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:34:in `chdir'
         8: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:35:in `block (2 levels) in updated_lockfile_content'
         7: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:115:in `run_current_npm_update'
         6: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:137:in `run_npm_updater'
         5: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:141:in `with_git_configured'
         4: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:139:in `block in run_npm_updater'
         3: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:151:in `run_npm_top_level_updater'
         2: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:109:in `run_helper_subprocess'
         1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse': 767: unexpected token at '' (JSON::ParserError)
        24: from bin/dry-run.rb:272:in `<main>'
        23: from bin/dry-run.rb:272:in `each'
        22: from bin/dry-run.rb:323:in `block in <main>'
        21: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:39:in `updated_dependency_files'
        20: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:148:in `updated_lockfiles'
        19: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:148:in `each'
        18: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:149:in `block in updated_lockfiles'
        17: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:120:in `package_lock_changed?'
        16: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater.rb:187:in `updated_package_lock_content'
        15: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:30:in `updated_lockfile_content'
        14: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:34:in `in_a_temporary_directory'
        13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in `mktmpdir'
        12: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `block in in_a_temporary_directory'
        11: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `chdir'
        10: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:37:in `block (2 levels) in in_a_temporary_directory'
         9: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:34:in `block in updated_lockfile_content'
         8: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:34:in `chdir'
         7: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:35:in `block (2 levels) in updated_lockfile_content'
         6: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:115:in `run_current_npm_update'
         5: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:137:in `run_npm_updater'
         4: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:141:in `with_git_configured'
         3: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:139:in `block in run_npm_updater'
         2: from /Users/wcopeland/Documents/Projects/dependabot-core/npm_and_yarn/lib/dependabot/npm_and_yarn/file_updater/npm_lockfile_updater.rb:151:in `run_npm_top_level_updater'
         1: from /Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:85:in `run_helper_subprocess'
/Users/wcopeland/Documents/Projects/dependabot-core/common/lib/dependabot/shared_helpers.rb:117:in `rescue in run_helper_subprocess': Dependabot::SharedHelpers::HelperSubprocessFailed
dependabot/dependabot-core

Answer questions greysteil

Looks like that's happening whilst shelling out to JS. Have you installed the JS helpers (as described in the README) or are you running in a dependabot-core Docker container?

useful!
source:https://uonfu.com/
answerer
Grey Baker greysteil @github London Helping secure the world's software @github. Previously @dependabot and @gocardless.
Github User Rank List