문제

having issue with loading Backbone dep fro my nodejs project:

module.js:340
    throw err;
    ^
Error: Cannot find module 'Backbone'
    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)

When I navigate to node_modules I can see backbone directory with backbone.js file. It works locally but when I upload it to digitalocean and install deps with ssh it says that it throws error.

Please help

P.S. what I tried:

rm -rf node_modules
npm cache clean
npm install

still no luck

도움이 되었습니까?

해결책

Windows is case-insensitive, Linux isn't. Try require('backbone') instead of require('Backbone').

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top