Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This error occur if user is anonymous.
If user is logged in, this error gone.
Comment | File | Size | Author |
---|---|---|---|
#1 | nodejs-jquery_is_not_defined-2201415-1.patch | 412 bytes | tien.xuan.vo |
Comments
Comment #1
tien.xuan.vo CreditAttribution: tien.xuan.vo commentedI think nodejs.js is depend on jquery and drupal libraries.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks, will look and commit this weekend.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks, committed and pushed:
http://drupalcode.org/project/nodejs.git/commit/a74a16d4f4ffcca52954508e...
Comment #6
Yorgg CreditAttribution: Yorgg commentedSorry to re-open, but I'm getting this
$ node nodejs.js
/Applications/MAMP/htdocs/d8/modules/nodejs/nodejs.js:145
})(jQuery, Drupal, drupalSettings);
^
ReferenceError: jQuery is not defined
at Object. (/Applications/MAMP/htdocs/d8rc/modules/nodejs/nodejs.js:145:4)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
$ drush pm-info nodejs
Extension : nodejs
Project : nodejs
Type : module
Title : Nodejs Integration
Description : Adds Node.js support to Drupal.
Version : 8.x-1.0-beta1+2-dev
Date : 2016-01-26
Package : Nodejs
Core : 8.x
PHP : 5.5.9
Status : enabled
Path : modules/nodejs
Schema version : 8000
Requires : none
Required by : nodejs_config, nodejs_connect, nodejs_notify, nodejs_watchdog
Permissions : none
Configure : nodejs.settings
Comment #7
Yorgg CreditAttribution: Yorgg commentedComment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedthe nodejs.js file is client-side javascript to be served by drupal and run in a browser.
so, running it with the node.js server as you have will always fail and you shouldn't do that.
i'm going to mark this as fixed again.
Comment #9
Yorgg CreditAttribution: Yorgg commentedThanks.
I've found more info in the readme file I didn't thought I would find one.