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 with exit code 1: npm version 0.22.2 --userconfig #651

Open
CalicoNino opened this issue Jul 31, 2023 · 2 comments
Open

Command failed with exit code 1: npm version 0.22.2 --userconfig #651

CalicoNino opened this issue Jul 31, 2023 · 2 comments

Comments

@CalicoNino
Copy link

CalicoNino commented Jul 31, 2023

Getting this error:

 Error: Command failed with exit code 1: npm version 0.22.2 --userconfig /tmp/83437ffc97d16db8f71020513bd690ce/.npmrc --no-git-tag-version --allow-same-version
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! The "from" argument must be of type string. Received undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-07-31T05_33_03_943Z-debug-0.log
v0.22.2
    at makeError (file:///home/runner/work/testing/testing/node_modules/semantic-release/node_modules/execa/lib/error.js:59:11)
    at handlePromise (file:///home/runner/work/testing/testing/node_modules/semantic-release/node_modules/execa/index.js:124:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async default (file:///home/runner/work/testing/testing/node_modules/semantic-release/node_modules/@semantic-release/npm/lib/prepare.js:26:3)
    at async prepare (file:///home/runner/work/testing/testing/node_modules/semantic-release/node_modules/@semantic-release/npm/index.js:63:3)
    at async validator (file:///home/runner/work/testing/testing/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///home/runner/work/testing/testing/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async Promise.all (index 0)
    at async next (file:///home/runner/work/testing/testing/node_modules/semantic-release/node_modules/p-reduce/index.js:15:44) {
  shortMessage: 'Command failed with exit code 1: npm version 0.22.2 --userconfig /tmp/83437ffc97d16db8f71020513bd690ce/.npmrc --no-git-tag-version --allow-same-version',
  command: 'npm version 0.22.2 --userconfig /tmp/83437ffc97d16db8f71020513bd690ce/.npmrc --no-git-tag-version --allow-same-version',
  escapedCommand: 'npm version 0.22.2 --userconfig "/tmp/83437ffc97d16db8f71020513bd690ce/.npmrc" --no-git-tag-version --allow-same-version',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'v0.22.2',
  stderr: 'npm ERR! code ERR_INVALID_ARG_TYPE\n' +
    'npm ERR! The "from" argument must be of type string. Received undefined\n' +
    '\n' +
    'npm ERR! A complete log of this run can be found in:\n' +
    'npm ERR!     /home/runner/.npm/_logs/2023-07-31T05_33_03_943Z-debug-0.log',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  pluginName: '@semantic-release/npm'
}

My release config:

module.exports = {
  branches: [
    { name: "main" }
  ],
  plugins: [
    [
      "@semantic-release/commit-analyzer",
      {
        preset: "conventionalCommits",
        parserOpts: {
          noteKeywords: [
            "BREAKING CHANGE",
            "BREAKING CHANGES",
            "BREAKING",
            "NEW RELEASE",
          ],
        },
        releaseRules: releaseRules,
      },
    ],
    [
      "@semantic-release/release-notes-generator",
      {
        preset: "conventionalCommits",
        parserOpts: {
          noteKeywords: [
            "BREAKING CHANGE",
            "BREAKING CHANGES",
            "BREAKING",
            "NEW RELEASE",
          ],
        },
        presetConfig: {
          types: notesTypes,
        },
      },
    ],
    [
      "@semantic-release/changelog",
      {
        changelogFile: "CHANGELOG.md",
      },
    ],
    [
      "@semantic-release/npm",
      {
        npmPublish: false,
      },
    ],
    [
      "@semantic-release/git",
      {
        assets: ["package.json", "CHANGELOG.md"],
        message:
          "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}",
      },
    ],
    [
      "@semantic-release/github",
      {
        assets: ["package.json", "CHANGELOG.md"],
        message:
          "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}",
      },
    ],
  ],
}

Not able to update package.json version or possibly publish

@sbellone
Copy link

sbellone commented Aug 7, 2023

Hey, I have a similar issue, but without any message on stderr 🤷 .
I've tried to force the resolution to v10.0.3, which worked in the past, but it continues to fail. We are using GitHub actions, I believe something has changed there. Do you use another CI?

Error: Command failed with exit code 1: npm version 2.2.10 --userconfig /tmp/b6dff767e03d5f1bd7031f71304dbeb2/.npmrc --no-git-tag-version --allow-same-version
    at makeError (file:///home/runner/work/renderscript/renderscript/node_modules/execa/lib/error.js:60:11)
    at handlePromise (file:///home/runner/work/renderscript/renderscript/node_modules/execa/index.js:124:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async default (file:///home/runner/work/renderscript/renderscript/node_modules/@semantic-release/npm/lib/prepare.js:26:3)
    at async prepare (file:///home/runner/work/renderscript/renderscript/node_modules/@semantic-release/npm/index.js:63:3)
    at async validator (file:///home/runner/work/renderscript/renderscript/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///home/runner/work/renderscript/renderscript/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async Promise.all (index 0)
    at async next (file:///home/runner/work/renderscript/renderscript/node_modules/p-reduce/index.js:15:44) {
  shortMessage: 'Command failed with exit code 1: npm version 2.2.10 --userconfig /tmp/b6dff767e03d5f1bd7031f71304dbeb2/.npmrc --no-git-tag-version --allow-same-version',
  command: 'npm version 2.2.10 --userconfig /tmp/b6dff767e03d5f1bd7031f71304dbeb2/.npmrc --no-git-tag-version --allow-same-version',
  escapedCommand: 'npm version 2.2.10 --userconfig "/tmp/b6dff767e03d5f1bd7031f71304dbeb2/.npmrc" --no-git-tag-version --allow-same-version',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  cwd: '/home/runner/work/renderscript/renderscript',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  pluginName: '@semantic-release/npm'

@CalicoNino
Copy link
Author

CalicoNino commented Aug 16, 2023

I am running it via github workflows, also I was able to resolve the issue by downgrading @semantic-release/npm to v9.0.0, but now I am facing a new error 🙃

npm ERR! Minipass.isStream is not a function

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

2 participants