I'm new to node, and npm and express.js are still learning. on the bootstrap website you can use bootstrap with npm install, and I did the same boot using npm install bootstrap --save, did it for jquery too and was needed in app.js
App.js file
var jQuery = require('jquery');
var bootstrap = require('bootstrap');
This has also changed.
global.jQuery = require('jquery');
var bootstrap = require('bootstrap');
var jQuery = require ('jquery'); var bootstrap = require ('bootstrap');
but when I start DEBUG=nodeAangularMySql:* ./bin/www, I get the following errors.
/home/sharif/Sites/node/nodeAangularMySql/node_modules/bootstrap/js/transition.js:59
}(jQuery);
^
ReferenceError: jQuery is not defined
at Object.<anonymous> (/home/sharif/Sites/node/nodeAangularMySql/node_modules/bootstrap/js/transition.js:59:3)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/sharif/Sites/node/nodeAangularMySql/node_modules/bootstrap/dist/js/npm.js:2:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
This is my first time I downloaded and copied bootstrap, in the stylesheets folder in a shared folder or in a Google CDN.
never used this before. I would like to know a little thisn
- How to use boot using npm install
- jquery npm
- .
?