A simple question, but I didn’t find the answer.

  node.js, question

Js
When I npm install jquery, node_module had an additional jquery folder.
But how do you refer to jquery.js in the view?

Jquery is generally referenced on views < scriptsrc ='./js/jquery.js' > </script >

I didn’t ask until I couldn’t find a solution.
————————————————
On the routevar $ = require("jquery")Only $,can be used on the current file.
However, the $ object cannot be found in views. do you have to use the script tag to import it

vianpm installDownloadedjqueryIs to usecommonjsNormative, it is not directly usable in self-executing functions after packaging, so it cannot be directly placed inscriptUsed in labels. You need to userequire('jquery')To use