If I create a new AWS instance (ubuntu 16.04 LTS) and create a directory (NodeT) then run the 2 commands:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
( from https://nodejs.org/en/download/package-manager/ )
I then have successfully installed node and npm?
node -v
npm -v
return their versions.
So have I created it locally on NodeT or globally on the whole system? Where is the node_modules directory?
I am trying to install mongodb on the system and am having troubles. I believe I need to run:
nodejs node_modules/node-sass/scripts/install.js
npm rebuild node-sass
( from https://github.com/sass/node-sass/issues/1579 ) to solve my problems, but the command can't find the node_modules directory and either can I.
I'm clearly missing the basic concept of nodejs. Any help would be appreciated.
type this command in your terminal
sudo npm root -g
Output (example):
/usr/local/lib/node_modules
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.