Can't install plugins
- OS: macOS 13.2
- Heroku CLI version: heroku/8.0.4 darwin-x64 node-v16.19.0
When I run
heroku plugins:install heroku-builds
Current Behavior
Installing plugin heroku-builds... failed
Error: yarn add heroku-builds@latest --non-interactive --mutex=file:/Users/louis/.local/share/heroku/yarn.lock --preferred-cache-folder=/Users/louis/Library/Caches/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 1
at ChildProcess.<anonymous> (/opt/homebrew/Cellar/heroku/7.68.2/lib/client/8.0.4-96472c6/node_modules/@oclif/plugin-plugins/lib/yarn.js:31:28)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
I tried with other plugins but I'm getting the same error
Expected Behavior
The plugins are installed.
@ldemesla just to troubleshoot a little, if you type npm -v in your terminal, what do you get?
I'm having trouble as well with version heroku/8.0.6 darwin-x64 node-v16.19.0 of the CLI . My npm version is 6.14.17. I'm on an M1 mac.
Here's the error I'm seeing when installing the data-maintenance plugin
heroku plugins:install data-maintenance
Installing plugin data-maintenance... ⣟ [1/4] Resolving packages...
warning heroku-builds > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be
Installing plugin data-maintenance... ⢿ [1/4] Resolving packages...
warning heroku-pg-extras > execa > [email protected]: cross-spawn no longe
Installing plugin data-maintenance... ⣻ [1/4] Resolving packages...
warning heroku-pg-extras > @heroku-cli/plugin-pg-v5 > [email protected]: Renamed t
Installing plugin data-maintenance... ⣻ [1/4] Resolving packages...
error An unexpected error occurred: "https://registry.npmjs.org/data-maintenance
Installing plugin data-maintenance... failed
Error: yarn add data-maintenance@latest --non-interactive
--mutex=file:/Users/dan/.local/share/heroku/yarn.lock
--preferred-cache-folder=/Users/dan/Library/Caches/heroku/yarn
I've tried deleting the yarn.lock file but have not had luck that way either.
We are working on a fix for this and hope to have it released very soon. In the meantime @trostli can you try running this and see if it works?
heroku plugins:install @heroku-cli/plugin-data-maintenance
That did work. thank you!
Currently, on an M1 Max Pro:
❯ heroku plugins:install @heroku-cli/plugin-data-maintenance
Installing plugin data-maintenance... ⣷ [2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/heroku/heroku-pg-extras.git
Directory: /Users/james/.local/share/heroku
Output:
fatal: unable to connect to github.com:
Installing plugin data-maintenance... ⣻ [2/2] Regenerating lockfile and installing missing dependencies...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/heroku/heroku-pg-extras.git
Directory: /Users/james/.local/share/heroku
Output:
fatal: unable to connect to github.com:
Installing plugin data-maintenance... ⢿ [2/2] Regenerating lockfile and installing missing dependencies...
Error: yarn remove @heroku-cli/plugin-data-maintenance --non-interactive --mutex=file:/Users/james/.local/share/heroku/yarn.lock
Installing plugin data-maintenance... failed
Error: yarn add @heroku-cli/plugin-data-maintenance@latest --non-interactive --mutex=file:/Users/james/.local/share/heroku/yarn.lock
--preferred-cache-folder=/Users/james/Library/Caches/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 128```
After following advice in #2074 , i removed yarn.lock from ~/.local/heroku/ and tried again, to no avail:
❯ heroku plugins:install @heroku-cli/plugin-data-maintenance
Installing plugin data-maintenance... ⣽ [1/4] Resolving packages...
Installing plugin data-maintenance... ⣟ [1/4] Resolving packages...
warning @heroku-cli/plugin-manifest > @heroku-cli/command > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for morInstalling plugin data-maintenance... ⣯ [1/4] Resolving packages...
warning @heroku-cli/plugin-manifest > cli-ux > @oclif/[email protected]: Deprecated in favor of @oclif/core
Installing plugin data-maintenance... ⣯ [1/4] Resolving packages...
warning heroku-accounts > [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed Installing plugin data-maintenance... ⣟ [1/4] Resolving packages...
warning heroku-builds > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to bInstalling plugin data-maintenance... ⣷ [1/4] Resolving packages...
Installing plugin data-maintenance... ⣻ [1/4] Resolving packages...
Installing plugin data-maintenance... ⣟ [1/4] Resolving packages...
warning @heroku-cli/plugin-data-maintenance > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Installing plugin data-maintenance... ⣷ [2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/heroku/heroku-pg-extras.git
Directory: /Users/james/.local/share/heroku
Output:
fatal: unable to connect to github.com:
Installing plugin data-maintenance... failed
Error: yarn add @heroku-cli/plugin-data-maintenance@latest --non-interactive --mutex=file:/Users/james/.local/share/heroku/yarn.lock
--preferred-cache-folder=/Users/james/Library/Caches/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 128```
removing all heroku-cli stuff and reinstalling works, plugins are installable....
for safety- i updated to the latest available heroku-cli (8.1.3-4ccc6bf) and was still able to install another plugin
hmmm, that said, this doesn't look convincing:
heroku-repo 1.0.14
❯ heroku plugins:install apps-table
Installing plugin apps-table... ⡿ [3/5] Fetching packages...
warning " > @oclif/[email protected]" has unmet peer dependency "@oclif/config@^1".
warning "@oclif/tslint > [email protected]" has incorrect peer dependency "typescript@^2.2.0 || ^3.0.0".
warning "@oclif/tslint > tslint-xo > [email protected]" has incorrect peer dependency "typescript@^2.1.0 || ^3.0.0".
warning "oclif > [email protected]" has unmet peer dependency "mem-fs@^1.2.0 || ^2.0.0".
Installing plugin apps-table... installed v1.0.0
❯ heroku plugins
heroku-repo 1.0.14
(although, heroku apps:table does work, so it just seems that it isn't listing all plugins....`
@imajes I'm glad you were able to get plugins installing. We are aware of the bug when listing plugins and will be fixing that soon. We appreciate your patience.
I had the exact error as ldemesla my error was due to using Yarn 2, therefore yarn commands used by heroku plugins:install heroku-builds were not compatible.
My workaround was to:
$ cd ~
$ yarn set version classic
$ yarn --version
1.22.19 # that will set your global yarn to v1
$ heroku plugins:install heroku-builds
$ yarn set version berry # restore your previous yarn
$ yarn --version
3.6.0 # as of today 3/06/2023, could change
I had this exact same issue, but by looking at the underlying error log - ~/.local/share/heroku/yarn-error.log I was able to figure out the underlying issue was in yarn V1 https://github.com/yarnpkg/yarn/issues/8242
I followed the workaround recommendation on that issue, which is to set the yarn timeout to 5 minutes (which is then used by the heroku plugin installer). This resolved it for me.
yarn config set network-timeout 300000
I am facing a similar issue.
For context, I am able to install individual plugins, but when I try to do heroku plugins:link, I get the above error in this thread
error xxx/node_modules/cpu-features: Command failed.
Exit code: 127
Command: node buildcheck.js > buildcheck.gypi && node-gyp rebuild
Arguments:
Directory: xxx/node_modules/cpu-features
Output:
heroku: linking plugin xxx... !
Error: yarn --non-interactive --mutex=file:packagexxx/yarn.lock
--preferred-cache-folder=/Users/username/Library/Caches/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 127
I have tried various steps in this thread, but none worked.
Device: M1 mac yarn: 1.22.21 npm: 10.2.4
If you face something like this, follow https://www.npmjs.com/package/node-gyp#on-macos to install xcode and npm-gyp separately.
It seems that everyone was able to install the wanted plugins. If this is still an issue for some of you, please open a new issue to give it proper tracking.
removing all heroku-cli stuff and reinstalling works, plugins are installable....
for safety- i updated to the latest available heroku-cli (8.1.3-4ccc6bf) and was still able to install another plugin
This worked for me as well. I did notice in the process of removing it that I may have had multiple installations. I had to follow the uninstall procedure for both the CLI uninstall and the homebrew uninstall and then I was able to successfully reinstall with homebrew and finally install the plugin.