Reinstall Node.js

Node went crazy


$ node
Illegal instruction

environment

2020-02-13-raspbian-buster-lite

Existing Node.js

"Install Node.js in Linux environment" https://qiita.com/nanbuwks/items/ed8adb2d4324c939a349 As shown, install as follows

  1. Include Node.js and npm in the official Linux distribution package
  2. Install the latest Node.js with npm install
  3. Delete the old Node.js

Delete

Find out where to install node


$ which node
/usr/local/bin/node

File deletion


$ sudo rm -rf /usr/local/bin/node
sudo rm -rf ~/.npm

Could it be deleted?

$ npm
/usr/bin/env: ‘node’: No such file or directory

After that, re-execute the previous document "Installing Node.js in a Linux environment" and re-install it.

Recommended Posts

Reinstall Node.js
1. Reinstall pip