This error occur if user is anonymous.
If user is logged in, this error gone.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tien.xuan.vo’s picture

Status: Active » Needs review
FileSize
412 bytes

I think nodejs.js is depend on jquery and drupal libraries.

Anonymous’s picture

thanks, will look and commit this weekend.

Anonymous’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Yorgg’s picture

Sorry 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

Yorgg’s picture

Status: Closed (fixed) » Active
Anonymous’s picture

Status: Active » Fixed

the 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.

Yorgg’s picture

Thanks.
I've found more info in the readme file I didn't thought I would find one.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.