Strongloop error: Cannot find module 'options'
Asked Answered
L

2

5

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?

Lasser answered 7/2, 2016 at 20:45 Comment(0)
R
9

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.

Rough answered 31/8, 2018 at 18:14 Comment(0)
L
2

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?

Lasser answered 7/2, 2016 at 21:35 Comment(2)
I also met this ussue with Ubuntu via Vagrant.Leakage
bizarrely, i faced with same issue on an another windows installed machine and your solution made it workStereoisomer

© 2022 - 2024 — McMap. All rights reserved.