尝试在Node.js中运行一些基本的JavaScript代码时出现此错误
ReferenceError: $ is not defined
at Object.<anonymous> (/home/ubuntu/workspace/nodetest2/public/javascripts/global.js:5:1)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.runMain [as _onTimeout] (module.js:441:10)
at Timer.listOnTimeout (timers.js:92:15)
在我的Layout.jade中,我添加了
script(src='http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js')
script(src='/public/javascripts/global.js')
感谢您的帮助。