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

Command failed: npm install semantic-release #79

Open
mancausoft opened this issue Sep 18, 2021 · 17 comments
Open

Command failed: npm install semantic-release #79

mancausoft opened this issue Sep 18, 2021 · 17 comments

Comments

@mancausoft
Copy link

mancausoft commented Sep 18, 2021

Describe the bug
Today i run it and had this error:

Run cycjimmy/semantic-release-action@v2

added 2 packages, and audited 3 packages in 963ms

found 0 vulnerabilities


Error: Error: Command failed: npm install @semantic-release/changelog @semantic-release/git @semantic-release/exec --silent

Workflow
No change on the worklow file, was passing 3 days ago.

Expected behavior
Not fail like in the last months

Additional context
Download action repository 'actions/checkout@v2' (SHA:5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f)
Download action repository 'cycjimmy/semantic-release-action@v2' (SHA:116647291d9b7bef1f5a4315deedd3f46ed4218b)

How i can debug this?

@revolunet
Copy link

same here, any pointers ?

@revolunet
Copy link

looks like you need to add

        with:
          semantic_version: 17

to your action

@mancausoft
Copy link
Author

Thanks

@mancausoft
Copy link
Author

@revolunet it's not fix the problem for me :(

  with:
    branch: staging
    extra_plugins: @semantic-release/changelog
  @semantic-release/git
  @semantic-release/exec
  
    semantic_version: 17
  env:
    GITHUB_TOKEN: ***
    GH_TOKEN: ***
    GITHUB_TOKEN_NPM: ***

added 2 packages, and audited 3 packages in 966ms

found 0 vulnerabilities

Error: Error: Command failed: npm install @semantic-release/changelog @semantic-release/git @semantic-release/exec --silent

@pennywisdom
Copy link

i believe its the git plugin that is causing the issue. The latest version (10.0.0) has a dependency on semantic-release@18.0.0 so it you havent fixed the plugin version then it could be throwing an error with this by trying to grab the latest version, yet all other plugins havent been updated to support (they were reporting support <= 18.0.0). I set the @semantic-release/git@9.0.1 to resolve things and work around the conflict here.

@skilbjo
Copy link

skilbjo commented Sep 22, 2021

@pennywisdom I believe your fix resolves the issue I was having in #80 but for me it didn't resolve this particular issue.

what is a workaround for me was to not use npm@7, and to downgrade to npm@6

I normally have my github actions config set up like this:

        ...
      - uses: actions/setup-node@v2
        with:
          node-version: 14
      - run: npm install -g npm@7

      - uses: cycjimmy/semantic-release-action@v2.5.4
        ...

the workaround for me was:

        ...
      - uses: actions/setup-node@v2
        with:
          node-version: 14
      # - run: npm install -g npm@7

      - uses: cycjimmy/semantic-release-action@v2.5.4
        ...

which is just a workaround, not a fix...

@nicolas2mey
Copy link

Got the same error

Fixed by specifying a setup-node step and it works now

      - uses: actions/checkout@v2

      - uses: actions/setup-node@v2
        with:
          node-version: '14'

      - name: Semantic Release
        uses: cycjimmy/semantic-release-action@v2.5.4
        with:
          semantic_version: 18.0.0
          extra_plugins: |
            @semantic-release/commit-analyzer@8.0.1
            @semantic-release/release-notes-generator@9.0.3
            @semantic-release/changelog@5.0.1
            @semantic-release/github@7.2.3
            @semantic-release/git@9.0.0

ghost pushed a commit to splunk/addonfactory-ucc-library that referenced this issue Dec 4, 2021
ghost pushed a commit to splunk/addonfactory-ucc-generator that referenced this issue Dec 4, 2021
ghost pushed a commit to splunk/pytest-splunk-addon that referenced this issue Dec 6, 2021
ghost pushed a commit to splunk/pytest-splunk-addon that referenced this issue Dec 6, 2021
ghost pushed a commit to splunk/addonfactory-ucc-library that referenced this issue Dec 6, 2021
ghost pushed a commit to splunk/addonfactory-ucc-generator that referenced this issue Dec 6, 2021
@pegiadise
Copy link

Is it actually some Node 16 breaking change that needs to be obliged?

@iamskok
Copy link

iamskok commented Dec 17, 2021

@pegiadise I don’t think it’s the reason.

This worked for me:

      - name: 🚀 Release
        uses: cycjimmy/semantic-release-action@v2
        id: semantic
        with:
          semantic_version: 18
          extra_plugins: |
            @semantic-release/changelog@6
            @semantic-release/git@10
            conventional-changelog-conventionalcommits@4.6.1

@pegiadise
Copy link

@pegiadise I don’t think it’s the reason.

This worked for me:

      - name: 🚀 Release
        uses: cycjimmy/semantic-release-action@v2
        id: semantic
        with:
          semantic_version: 18
          extra_plugins: |
            @semantic-release/changelog@6
            @semantic-release/git@10
            conventional-changelog-conventionalcommits@4.6.1

Yup. I also ended up using semantic 18. It seems that the issue is with semantic 17 and Node 16.

soedirgo added a commit to supabase/storage that referenced this issue Jan 19, 2022
Something about semantic-release version? cycjimmy/semantic-release-action#79
soedirgo added a commit to supabase/storage that referenced this issue Jan 19, 2022
Something about semantic-release version? cycjimmy/semantic-release-action#79
gnarea added a commit to relaycorp/shared-workflows that referenced this issue Apr 21, 2022
@prein
Copy link

prein commented Sep 14, 2022

For me this error was happening due to packages permission missing from the job

@mirkolenz
Copy link

mirkolenz commented Jan 19, 2023

I faced the same issue today. For me, the problem is isolated to one repository. The main difference between my other repos where this action is used is that actions/setup-java is used since I intent to use gradle-semantic-release-plugin. I attached my release workflow at the end of this comment. I went through this entire thread and all proposed solutions did not work, I even explicitly set the versions for all packages. Is there anything I am missing?

Another thing to note: When running the seemingly failed command in my local shell, everything works fine and no error is thrown. So I assume it is not a mismatch of some dependencies here.

on:
  push:
    branches:
      - main
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: "lts/*"
      - uses: actions/setup-java@v3
        with:
          java-version: "17"
          distribution: "adopt"
      - uses: bufbuild/buf-setup-action@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - uses: arduino/setup-protoc@v1
        with:
          version: "3.x"
          repo-token: ${{ secrets.GITHUB_TOKEN }}
      - uses: cycjimmy/semantic-release-action@v3
        env:
          GITHUB_TOKEN: ${{ github.token }}
          GITHUB_ACTOR: ${{ github.actor }}
          OSSRH_ACTOR: ${{ secrets.OSSRH_ACTOR }}
          OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
          SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
          SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
        with:
          semantic_version: 19
          extra_plugins: |
            @semantic-release/git@10
            @semantic-release/changelog@6
            @semantic-release/exec@6
            conventional-changelog-conventionalcommits@5
            gradle-semantic-release-plugin@1

@iamludal
Copy link
Contributor

There should be a way to disable the "--silent" flag, for example when re-running a failed job with the "debug" mode enabled.
This would allow to get more information about the error. This happened to me today. Had to create a fork and disable the "--silent" flag to understand the issue.

amuramoto added a commit to googlemaps/js-samples that referenced this issue Mar 27, 2023
@sdelpuerto-intelygenz
Copy link

It's possible to disable the --silent flag by passing:

env:
  RUNNER_DEBUG: 1

@iamludal
Copy link
Contributor

You're right, see : 6d1b158

@sdelpuerto-intelygenz
Copy link

Yeah that's how I found it. I'm not sure why --silent is added by default but this should definitely be documented.

@iamludal
Copy link
Contributor

Definitely. Also, it should be documented that the RUNNER_DEBUG environment variable is automatically set by GitHub when re-running a failed job and checking the "Enable debug logs" box.

wangela added a commit to googlemaps/google-maps-ios-utils that referenced this issue Jun 2, 2023
wangela added a commit to googlemaps/google-maps-ios-utils that referenced this issue Jun 2, 2023
* chore: allow dependabot to call test workflow

* chore: more fix for semantic release action per cycjimmy/semantic-release-action#79 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests