heroku / cli

Heroku CLI
https://devcenter.heroku.com/articles/heroku-cli
ISC License
849 stars 221 forks source link

Error Plugin: heroku-open-dashboard: files attribute must be specified #909

Closed zeke closed 6 years ago

zeke commented 6 years ago
$ heroku login --sso                
(node:2670) Error Plugin: heroku-open-dashboard: files attribute must be specified in /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard/package.json
module: @oclif/config@1.6.27
plugin: heroku-open-dashboard
root: /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard
See more details with DEBUG=*
(node:2670) Error Plugin: heroku-open-dashboard: files attribute must be specified in /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard/package.json
module: @oclif/plugin-legacy@1.0.15
plugin: heroku-open-dashboard
root: /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard
See more details with DEBUG=*
Organization name: TypeError: Cannot read property 'body' of undefined
    at new HerokuAPIError (~/.local/share/heroku/client/7.0.86/node_modules/@heroku-cli/command/lib/api_client.js:12:33)
    at Login.login (~/.local/share/heroku/client/7.0.86/node_modules/@heroku-cli/command/lib/login.js:78:19)
$ heroku --version
(node:2758) Error Plugin: heroku-open-dashboard: files attribute must be specified in /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard/package.json
module: @oclif/config@1.6.27
plugin: heroku-open-dashboard
root: /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard
See more details with DEBUG=*
(node:2758) Error Plugin: heroku-open-dashboard: files attribute must be specified in /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard/package.json
module: @oclif/plugin-legacy@1.0.15
plugin: heroku-open-dashboard
root: /Users/z/.local/share/heroku/node_modules/heroku-open-dashboard
See more details with DEBUG=*
heroku/7.0.86 darwin-x64 node-v10.1.0
zeke commented 6 years ago

Note: the CLI still works. It just also prints this output on any command.

RasPhilCo commented 6 years ago

@jdxcode looks like Jesper owns this (https://www.npmjs.com/package/heroku-open-dashboard) let's see if he'll give it to us

zeke commented 6 years ago

Hi @jesperfj! 👋

jdx commented 6 years ago

looks like the last PR to the package added the files attribute, it just needs to be pushed to npm

jesperfj commented 6 years ago

Just pushed @zeke @jdxcode.

ivanakruljac commented 6 years ago

I have similar issue with heroku plugins:install heroku-fork

I'm trying to change the Region:

ivana@yoga-lenovo:~/beni$ heroku plugins:install heroku-fork
warning heroku-fork@4.1.27: heroku fork is deprecated
(node:27421) Error Plugin: heroku-fork: files attribute must be specified in /home/ivana/.local/share/heroku/node_modules/heroku-fork/package.json
module: @oclif/config@1.6.33
plugin: heroku-fork
root: /home/ivana/.local/share/heroku/node_modules/heroku-fork
See more details with DEBUG=*
Installing plugin heroku-fork... installed v4.1.27
ivana@yoga-lenovo:~/beni$ heroku fork --from sourceapp --to targetapp --region eu
(node:27503) Error Plugin: heroku-fork: files attribute must be specified in /home/ivana/.local/share/heroku/node_modules/heroku-fork/package.json
module: @oclif/config@1.6.33
plugin: heroku-fork
root: /home/ivana/.local/share/heroku/node_modules/heroku-fork
See more details with DEBUG=*
(node:27503) Error Plugin: heroku-fork: files attribute must be specified in /home/ivana/.local/share/heroku/node_modules/heroku-fork/package.json
module: @oclif/plugin-legacy@1.0.18
plugin: heroku-fork
root: /home/ivana/.local/share/heroku/node_modules/heroku-fork
See more details with DEBUG=*
 ▸    You do not have access to the app sourceapp.

Any kind of help would be welcome! Thnx in advance!

alexandermckay commented 6 years ago

@ivanakruljac I was having trouble doing the same thing. The way I solved it was by:

  1. Run heroku plugins:install heroku-fork
  2. Follow the file path: /home/ivana/.local/share/heroku/node_modules/heroku-fork/package.json
  3. Open the package.json file in the heroku-fork directory
  4. Add the 'files' field with the value ["*"], this is usually an optionally field and ["*"] is the assumed value when it is omitted so it shouldn't create any strange errors for you. Next time you run the command from step 1. this change will be overwritten:
    
    "name": "heroku-fork",
    "version": "4.1.27",
    "description": "Heroku CLI plugin to fork an existing app into a new app.",
    "main": "index.js",
    "files":["*"],
ffmit commented 6 years ago

@alexandermckay This worked. As you described the change is overwritten when I re-run the command from first step.

alexandermckay commented 6 years ago

@ffmit that's great, happy to help.

drummonds commented 5 years ago

Great this worked for the same error on heroku-guvscale

Malebinho commented 4 years ago

Resolveu o meu problema, muito obrigado.