سؤال

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