I had installed the NodeJS like this:
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get install -y nodejs
And updated npm:
npm install npm@latest -g
Then installed the express module
npm install express -g
At the end i've created a file test.js in which wrote require("express")
. Then tried to execute the file by comand node test
, but NodeJS said what he cant to find the express module:
Error: Cannot find module 'express'