Closed lfortin closed 12 years ago
This is interesting.
Is this on a windows system?
I encountered this error also, on a windows OS, and after installed those 2 modules I got this stack,
var $ = require('jQuery'); TypeError: Cannot read property 'userAgent' of undefined at C:\svr\node_modules\jQuery\lib\node-jquery.js:87:23 at C:\svr\node_modules\jQuery\lib\node-jquery.js:995:2 at create (C:\svr\node_modules\jQuery\lib\node-jquery.js:9416:2) at C:\svr\node_modules\jQuery\lib\node-jquery.js:9422:18 at Object.
(C:\svr\node_modules\jQuery\lib\node-jquery.js:9424:1)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Module.require (module.js:359:17)
Note the difference between jquery
and jQuery
in npm. I believe the jquery
branch has been dropped in favor of jQuery
.
Previously jQuery
worked with ender
and jquery
worked with node
.
I've stopped using any of the jQuery in favor of ender, plus since they updated ender to require from the browser global the vanilla jQuery (non-npm) now works with ender.
Perhaps jquery
should be have an update with a deprecation notice?
If you say that 'jquery' is no longer used as opposed to 'jQuery', it would be nice to flag it as deprecated, because on npm registry, there are almost 40 packages that depend on 'jquery'; only 10 packages or so depend on 'jQuery'.
Then, my plugin(for instance, jQuery Drive) should depend on 'jQuery' rather than 'jquery'?
I think I know why... I did not have g++ installed... Sorry, my mistake.
Doing:
causes error in repl mode.
Seems to happen when modules 'location' and 'navigator' are not installed.
Adding 'location' and 'navigator' in package.json dependencies could fix the problem?