Closed egeldenhuys closed 7 years ago
sudo npm install --global electron
module.js:487
throw err;
^
Error: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/unsupported.js:2:14)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
sudo pacman -R npm nodejs
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: acorn: removing nodejs breaks dependency 'nodejs'
:: apm: removing npm breaks dependency 'npm'
:: eslint: removing nodejs breaks dependency 'nodejs'
:: semver: removing nodejs breaks dependency 'nodejs'
$ npm run build:linux
prothesis-2@0.0.0 build:linux /home/{npm is for kiddies}/Github/prothesis-2 cross-env PLATFORM_TARGET=linux node tasks/release.js
sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! prothesis-2@0.0.0 build:linux: cross-env PLATFORM_TARGET=linux node tasks/release.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the prothesis-2@0.0.0 build:linux script.
npm ERR! This is probably not a problem with npm ( Nothing is ever wrong with npm ). There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to {remove this bloat}?
npm ERR! A complete log of this run can be found in: npm ERR! /home/{STOP}/{LEAVE MY DISK ALONE}/_logs/2017-06-26T18_30_04_743Z-debug.log
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/lib/node_modules
sudo rm -rf ~/.npm
sudo pacman -S semver
npm update -g npm
npm ERR! addLocal Could not install /build/npm/src/npm-4.6.1
You can't comment at this time — your comment is too long (maximum is 65536 characters).
atom .
nohup: failed to run command 'electron': No such file or directory
@Quantum-Sicarius @RagingGrim I broke everything Node.js related. Atom is no longer working. I can't figure out how to remove Node and npm completely from my system.
Any advice?
Here is a stack trace:
$ atom -f
App threw an error during load
Error: The module '/usr/lib/atom/node_modules/nslog/build/Release/nslog.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 50. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/atom/node_modules/nslog/lib/nslog.js:5:11)
at Object.<anonymous> (/usr/lib/atom/node_modules/nslog/lib/nslog.js:15:4)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: The module '/usr/lib/atom/node_modules/nslog/build/Release/nslog.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 50. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/atom/node_modules/nslog/lib/nslog.js:5:11)
at Object.<anonymous> (/usr/lib/atom/node_modules/nslog/lib/nslog.js:15:4)
Dont worry, I fixed it with sudo rm -fr /usr/lib/atom
$ sudo rm -fr /usr/lib/
^C
prompt_status:5: command not found: wc
prompt_dir:1: command not found: grep
EDIT: How to shutdown gracefully without opening a terminal?
Depending on the libs you deleted it might be impossible xD
/usr/bin/poweroff or shutdown might work if you have something you can use to navigate there ( which's libs haven't already been deleted )
I guess just hold down the shutdown button, It's an event that can(maybe) be caught so hopefully the kernel catches and semi-gracefully dies.
@RagingGrim I realise graceful has been lost after deleting most system utils.
How did you fuck up so bad Evert XD
I was impatient 😆 , It was time for a fresh install anyways.
This is a side effect of nmp, no mistakes were made.
Fixed in develop
Node giving you an exception? Add it here!
Got a nice long stack trace? Paste it here!
Too much salt? Shake here!
We might incorporate this as part of our final presentation.