Windows is case-insensitive, Linux isn't. Try require('backbone')
instead of require('Backbone')
.
node can not find module - Backbone?
-
18-06-2023 - |
سؤال
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
المحلول
لا تنتمي إلى StackOverflow