Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.65k stars 9.79k forks source link

Brew does not fully uninstall #5094

Closed mooleshacat closed 6 years ago

mooleshacat commented 6 years ago

**To help us debug your issue please explain:

1) Installed brew to try it 2) Didn't like it 3) Uninstalled brew 4) Installed NVM & NodeJS v8.1.4 5) Updated NPM & node-gyp to @latest 6) Installed PM2 7) Now cannot use NodeJS installed with nvm/npm/pm2 with errors showing ".linuxbrew" 8) echo $PATH still shows linux brew remains even after uninstall, disconnect, reconnect 9) Nothing exists in ~/.bashrc related to linux brew

When I run "node init.js" everything runs perfectly fine (minus the fact I am half done setting up the pool software):

kthx@mn0:~/BOOTNOMP$ node init.js [2018-10-12T11:39:04.291Z] [debug] [system] [init.js] : POSIX Connection Limit (Safe to ignore) POSIX module not installed and resource (connection) limit was not raised [2018-10-12T11:39:05.330Z] [debug] [system] [SwitchingSetup[:1]] : Loading last proxy state from redis [2018-10-12T11:39:05.347Z] [debug] [system] [init.js] : Master [2018-10-12T11:39:05.362Z] [debug] [mogwaicoin] [ShareProcessor [:0]] : Share processing setup with redis (127.0.0.1:6379) [2018-10-12T11:39:05.364Z] [error] [mogwaicoin] [Pool [:1]] : Could not start pool, error with init batch RPC call: {"type":"offline","message":"connect ECONNREFUSED 127.0.0.1:19000"} [2018-10-12T11:39:05.718Z] [debug] [system] [SwitchingSetup[:2]] : Loading last proxy state from redis [2018-10-12T11:39:05.746Z] [debug] [mogwaicoin] [ShareProcessor [:1]] : Share processing setup with redis (127.0.0.1:6379) [2018-10-12T11:39:05.759Z] [error] [mogwaicoin] [Pool [:2]] : Could not start pool, error with init batch RPC call: {"type":"offline","message":"connect ECONNREFUSED 127.0.0.1:19000"} [2018-10-12T11:39:05.847Z] [debug] [system] [SwitchingSetup[:3]] : Loading last proxy state from redis [2018-10-12T11:39:05.866Z] [debug] [mogwaicoin] [ShareProcessor [:2]] : Share processing setup with redis (127.0.0.1:6379) [2018-10-12T11:39:05.867Z] [error] [mogwaicoin] [Pool [:3]] : Could not start pool, error with init batch RPC call: {"type":"offline","message":"connect ECONNREFUSED 127.0.0.1:19000"} [2018-10-12T11:39:06.204Z] [debug] [system] [SwitchingSetup[:4]] : Loading last proxy state from redis [2018-10-12T11:39:06.220Z] [debug] [mogwaicoin] [ShareProcessor [:3]] : Share processing setup with redis (127.0.0.1:6379) [2018-10-12T11:39:06.222Z] [error] [mogwaicoin] [Pool [:4]] : Could not start pool, error with init batch RPC call: {"type":"offline","message":"connect ECONNREFUSED 127.0.0.1:19000"} [2018-10-12T11:39:06.320Z] [info] [system] [CLI] : CLI listening on 0.0.0.0:17000

But when I run "pm2 start init.js --watch --name pool" I get this error from PM2:

0|pool | Error: Cannot find module '/home/linuxbrew/.linuxbrew/lib/node_modules/pm2/lib/ProcessContainerFork.js' 0|pool | at Function.Module._resolveFilename (module.js:336:15) 0|pool | at Function.Module._load (module.js:278:25) 0|pool | at Function.Module.runMain (module.js:501:10) 0|pool | at startup (node.js:129:16) 0|pool | at node.js:814:3 0|pool | module.js:338 0|pool | throw err; 0|pool | ^ 0|pool | Error: Cannot find module '/home/linuxbrew/.linuxbrew/lib/node_modules/pm2/lib/ProcessContainerFork.js' 0|pool | at Function.Module._resolveFilename (module.js:336:15) 0|pool | at Function.Module._load (module.js:278:25) 0|pool | at Function.Module.runMain (module.js:501:10) 0|pool | at startup (node.js:129:16) 0|pool | at node.js:814:3

Now this error is thrown by PM2, however I am not posting in PM2 issue repo because this error involves remains of a linux brew installation.

If someone can help please, I have tried also: rm -rf ~/.npm rm -rf ~/.nvm rm -rf ~/.pm2 rm -rf node_modules rebuilding all NPM packages incl. PM2

I know there is a node_modules folder somewhere in the root system, I will try and find it and delete PM2 from it

Thanks :)

mooleshacat commented 6 years ago

/lib/node_modules/ exists, however the only subdir is npm because I updated npm to latest, so all the node modules are in /lib/node_modules/npm/node_modules/ but there is no PM2 subdir there...

mooleshacat commented 6 years ago

I just posted the issue on PM2 list as well... Someone will help me figure it out: https://github.com/Unitech/pm2/issues/3961