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

Artifact update problem: "Failed to replace env in config: ${NPM_TOKEN}". #3551

Closed
cmschuetz opened this issue Apr 16, 2019 · 1 comment
Closed

Comments

@cmschuetz
Copy link

cmschuetz commented Apr 16, 2019

What Renovate type are you using?
Renovate GitHub App

Describe the bug

All pull requests fail with error message: Artifact update problem.
Possibly related to https://github.com/renovatebot/renovate/issues/3512

Did you see anything helpful in debug logs?

Yes, here is an example failure snippet:

 "stderr": "error An unexpected error occurred: \"Failed to replace env in config: ${NPM_TOKEN}\".\n",
    "message": "Command failed: node /home/ubuntu/renovateapp/node_modules/yarn/bin/yarn.js install --ignore-scripts --ignore-engines --ignore-platform --mutex network:31879\nerror An unexpected error occurred: \"Failed to replace env in config: ${NPM_TOKEN}\".\n `node /home/ubuntu/renovateapp/node_modules/yarn/bin/yarn.js install --ignore-scripts --ignore-engines --ignore-platform --mutex network:31879` (exited with error code 1)",
    "stack": "ChildProcessError: Command failed: node /home/ubuntu/renovateapp/node_modules/yarn/bin/yarn.js install --ignore-scripts --ignore-engines --ignore-platform --mutex network:31879\nerror An unexpected error occurred: \"Failed to replace env in config: ${NPM_TOKEN}\".\n `node /home/ubuntu/renovateapp/node_modules/yarn/bin/yarn.js install --ignore-scripts --ignore-engines --ignore-platform --mutex network:31879` (exited with error code 1)\n    at callback (/home/ubuntu/renovateapp/node_modules/child-process-promise/lib/index.js:33:27)\n    at ChildProcess.exithandler (child_process.js:301:5)\n    at ChildProcess.emit (events.js:182:13)\n    at ChildProcess.EventEmitter.emit (domain.js:441:20)\n    at maybeClose (internal/child_process.js:962:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)"

To Reproduce
Steps to reproduce the behavior:

  1. Create repository with an .npmrc using the structure below
  2. Add renovate as a member of said private npm org

Expected behavior
Pull requests should get generated successfully

Screenshots

DeepinScreenshot_select-area_20190416135048

Additional context

  • Renovate is a member of our private org
  • We use an .npmrc that look like this:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
@PRIVATE_ORG:registry=https://registry.npmjs.org/
@cmschuetz cmschuetz changed the title Artifacts update problem: "Failed to replace env in config: ${NPM_TOKEN}". Artifact update problem: "Failed to replace env in config: ${NPM_TOKEN}". Apr 16, 2019
@rarkins
Copy link
Collaborator

rarkins commented Apr 16, 2019

You can either remove the file from the repo or else add ignoreNpmrcFile=true in your Renovate config. Please post any follow up questions to the config-help repo

Note: you may need to manually request the rebase/retry checkbox in each PR after your config update, if you don't have automatic rebasing enabled

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

No branches or pull requests

2 participants