Skip to content
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

Started getting error "npx: command not found: renovate" after July 21th 2024. #78

Closed
mlanglet opened this issue Aug 23, 2024 · 8 comments
Labels

Comments

@mlanglet
Copy link

I noticed our renovate pipeline has had a few failed weekly executions. The first error was because we were using node version 20.9.0 which was too old for the renovate task. I have tried using node version 20.17.0 and 21.7.3 but both results in the same error. Please advise!

Build output

Starting: Renovate
==============================================================================
Task         : Renovate Me
Description  : Renovate your libs on your selected Azure Repo
Version      : 1.0.5
Author       : Jean-Yves COUET
Help         : [Renovate Me](https://marketplace.visualstudio.com/items?itemName=jyc.vsts-extensions-renovate-me) based on [renovate](https://github.com/singapore/renovate)
==============================================================================
/opt/hostedtoolcache/node/10.24.1/x64/bin/npx --yes --package renovate@latest -- renovate-config-validator

npx: installed 203 in 6.26s

npx: command not found: renovate

##[error]exec(npx, --yes --package renovate@latest -- renovate-config-validator): Error: The process '/opt/hostedtoolcache/node/10.24.1/x64/bin/npx' failed with exit code 127
##[error]Error: exec(npx, --yes --package renovate@latest -- renovate-config-validator): Error: The process '/opt/hostedtoolcache/node/10.24.1/x64/bin/npx' failed with exit code 127
Finishing: Renovate

Pipeline definition

trigger: none

schedules:
  - cron: "0 0 * * 1-4"
    displayName: "Run renovatebot at midnight (Monday-Thursday)"
    branches:
      include:
        - develop
    always: true

pool:
  vmImage: ubuntu-latest

steps:
  - task: UseNode@1
    displayName: 'Use Node 21.7.3'
    inputs:
      versionSpec: '21.7.3'
  - task: RenovateMe@1
    inputs:
      renovateOptionsVersion: 'latest'
    displayName: Renovate
@mlanglet mlanglet added the bug label Aug 23, 2024
@jycouet
Copy link
Owner

jycouet commented Aug 23, 2024

So it's sometime failing sometime not? 🤔

@mlanglet
Copy link
Author

It's failing consistently right now.

@jycouet
Copy link
Owner

jycouet commented Aug 24, 2024

Hummm, I'm not using renovateMe anymore but directly renovate (in github), and from the same date I have also issues with renovate!
On my side, it seems to be a config that was deprecated and not working anymore.

Here is the discussion: renovatebot/renovate#30891

Maybe you can share your config file? You can also try to point to an old renovate version to see ?

@mlanglet
Copy link
Author

Interesting, I'll try to run with an older version, thanks.

Here is our config file.

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "packageRules": [
    {
      "groupName": "all non-major dependencies",
      "groupSlug": "all-minor-patch",
      "matchPackagePatterns": [
        "*"
      ],
      "matchUpdateTypes": [
        "minor",
        "patch"
      ]
    },
    {
      "datasources": [
        "docker"
      ],
      "packageNames": [
        "postgres"
      ],
      "allowedVersions": "13.12"
    },
    {
      "datasources": [
        "docker"
      ],
      "packageNames": [
        "eclipse-temurin"
      ],
      "allowedVersions": "21-jre-alpine"
    }
  ]
}

@jycouet
Copy link
Owner

jycouet commented Aug 26, 2024

I updated renovatebot/renovate#30891 (comment)

Can you also add more logs ? Maybe it's saying that one key is not valid ?

@mlanglet
Copy link
Author

mlanglet commented Aug 27, 2024

I tried adding

    env:
      LOG_LEVEL: debug

But I don't get any additional logs.

Isn't this problem caused because the extension doesn't seem to have access to the renovate command via npx for some reason? I'm not sure why that would happen though.

npx: command not found: renovate

@mlanglet
Copy link
Author

It's one of those days. Feeling kinda stupid right now.

Swapping from the task NodeTool@0 to UseNode@1 changes the parameter name from versionSpec to version. If none is provided it defaults to node 10.x.. No wonder it couldn't find the command.

Updated and working pipeline definition:

trigger: none

schedules:
  - cron: "0 0 * * 1-4"
    displayName: "Run renovatebot at midnight (Monday-Thursday)"
    branches:
      include:
        - develop
    always: true

pool:
  vmImage: ubuntu-latest

steps:
  - task: UseNode@1
    displayName: 'Use Node 20.17.0'
    inputs:
      version: '20.17.0'
  - task: RenovateMe@1
    displayName: Renovate

Please excuse my idiocy, case closed.

@jycouet
Copy link
Owner

jycouet commented Aug 27, 2024

Haha, thanks or the update.
I like this issues where I have nothing to do ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants