heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

heroku toolbelt core plugin issue #1833

Open ghost opened 8 years ago

ghost commented 8 years ago

I was following the directions from RailsBridge's installfest for Windows (using Windows 10 64-bit) and got to the part where I install the toolbelt. I have an account with Heroku set up already, so it was a matter of just getting the toolbelt running. When I use any command, be it 'heroku login' or 'heroku version', it begins to add dependencies, which it completes, and then tries to install core plugins. This always fails. Here's a copy of some of my error logs for a single attempt at running a heroku command:

"2015/11/20 13:24:37 Error reading plugin: heroku-fork. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:24:37 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-fork' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:24:38 Error reading plugin: heroku-git. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:24:38 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-git' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:24:39 Error reading plugin: heroku-local. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:24:39 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-local' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:24:40 Error reading plugin: heroku-run. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:24:40 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-run' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:24:40 Error reading plugin: heroku-status. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:24:40 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-status' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:24:40 ERROR: runtime error: invalid memory address or nil pointer dereference 2015/11/20 13:24:44 running from C:\Users\tonibethhausler\AppData\Local/heroku/heroku-cli.exe 2015/11/20 13:24:44 heroku-cli: Adding dependencies... 2015/11/20 13:25:39 done 2015/11/20 13:25:39 heroku-cli: Installing core plugins... 2015/11/20 13:25:41 Error reading plugin: heroku-cli-addons. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:41 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-cli-addons' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:43 Error reading plugin: heroku-apps. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:43 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-apps' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:44 Error reading plugin: heroku-fork. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:44 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-fork' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:46 Error reading plugin: heroku-git. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:46 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-git' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:47 Error reading plugin: heroku-local. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:47 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-local' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:48 Error reading plugin: heroku-run. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:48 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-run' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:49 Error reading plugin: heroku-status. See C:\Users\tonibethhausler\AppData\Local\heroku\error.log for more information. 2015/11/20 13:25:49 exit status 1 module.js:339 throw err; ^

Error: Cannot find module 'heroku-status' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at [eval]:2:15 at Object.exports.runInThisContext (vm.js:54:17) at Object. ([eval]-wrapper:6:22) at Module._compile (module.js:425:26) at node.js:587:27 at doNTCallback0 (node.js:428:9)

2015/11/20 13:25:49 ERROR: runtime error: invalid memory address or nil pointer dereference"

I can't find any resources on this issue specifically.

ghost commented 8 years ago

This issue has been resolved. I was informed that this was a bug that got pushed through and that it was corrected. I deleted in the heroku-cli in my heroku folder and reinstalled. Heroku toolbelt now works.

FelipeTaiarol commented 8 years ago

I am having the same problem. I tried to reinstall it but it didn't work.

ghost commented 8 years ago

Wait, are you trying to reinstall from the actual .exe (or whatever appropriate file extension your OS uses)? Because I didn't do that. I just went into the heroku folder, deleted the one heroku-cli file, went back to my prompt and typed in 'heroku'. It worked from there.

bogdanRada commented 8 years ago

I have same issue. Can't seem to run heroku run bash or anything after the run However i can see the version , or login

I am using Ubuntu 16.04 and i have this versions of heroku :

heroku-toolbelt/3.43.9 (x86_64-linux) ruby/2.3.1
heroku-cli/5.2.34-65b16c9 (linux-amd64) go1.6.2
You have no installed plugins.

This is the error i am getting

module.js:442
    throw err;
    ^

Error: Cannot find module 'heroku-run'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/raul/.cache/heroku/tmp/heroku-script-911878717:10:14)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

Every time i run the heroku run bash , a folder is created in the current directory named ":" , which has this structure:

:/
└── usr
    └── local
        └── monodevelop-3.0.3.5
            └── share
                └── heroku
                    └── cli

Although my Mono version is this:

Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

Could it be related to the fact that i am using a newer version of Mono?

However trying to downgrade to mono 3.0.3.5 , seems to require package "mono-gmcs" , which on Ubuntu 16.04 i get this when trying to install:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mono-gmcs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  mono-xbuild mono-mcs mono-devel

E: Package 'mono-gmcs' has no installation candidate

Any help would be greatly appreciated.

jdx commented 8 years ago

what is your LOCALAPPDATA set to?

bogdanRada commented 8 years ago

I was able to figure it out . I don;t have anything in LOCALAPPDATA, and i haven't checked before the other environment variables.

But you have gave me a wonderful idea, so i checked the rest of the env variables and found something strange when using the command printenv:

XDG_DATA_HOME=:/usr/local/monodevelop-3.0.3.5/share
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/usr/local/monodevelop-3.0.3.5/share

Which after some investigation, it seems there were in my bashrc profile, probably left when i upgraded my Ubuntu version from 14.04 to 16.04

export XDG_DATA_HOME=$XDG_DATA_HOME:/usr/local/monodevelop-3.0.3.5/share
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/local/monodevelop-3.0.3.5/share

After removing them and using this commands from here: http://www.commandlinefu.com/commands/view/11373/make-changes-in-.bashrc-immediately-available to make printenv work , because it was keep showing them although i tried using bash --login or source ~/.bashrc after i removed them from the file

Now everything works fine :) Sorry for the trouble. I haven't realized before that i might have some leftover environment variables left in my bashrc file .

Thank you for your support. Have a nice day.