In order to install nodejs on a chromebook you must have linux enabled. If you do not have linux enabled on your computer please follow the steps outlined below.
Note: You can also get to the Settings section by selecting time on the bottom right and clicking on Settings.
Once Linux has been successfully installed, the terminal should open up automatically (if not, navigate to it by searching in the app Launcher). Check for any updates by typing
sudo apt update
Update any packages that need to be upgrated by typing
sudo apt upgrade
You need to install NVM (Node Virtual Manager) before you can install nodejs. Follow the steps listed below.
Note: Depending on when you are reading this, you may need to install a later version of node. As of this example, node 10 will be installed.
nvm i 14
Once all these is done, you should have node and npm installed. Type in
node -v to double check.