Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strongloop error: Cannot find module 'options'

I wanted to deploy my app on remote Linux server. I am using loopback and I wanted to follow instruncions in docs. Ive build an app using arc, started proces manager on remote host and deployed it using slc deploy http://my.host. Deploy was successful, but process manager started to throw this error:

module.js:340
throw err;
      ^
Error: Cannot find module 'options'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/arthdesigns/.strong-pm/svc/2/work/d3a01b1e3e31ee5561e69ef7aa072531cc581fc2.1454877049098/node_modules/sse/lib/sse.js:1:77)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)

Its strange, because on my workspace everything works fine. Anyone know solution?

like image 845
Arth Avatar asked Feb 07 '16 20:02

Arth


2 Answers

When this happens, it usually means you copied or cloned a source tree along with a populated node_modules/ to a new location.

Usually, rm -rf node_modules; npm install will fix the problem.

like image 120
bradobro Avatar answered Nov 03 '22 16:11

bradobro


Okey, I found solution. I just went to this sse.js and installed dependencies via npm i and npm i node-options.

But my second question is: why it worked on windows, but on linux I had to install it manualy?

like image 40
Arth Avatar answered Nov 03 '22 15:11

Arth