I am trying to call using ajax login API but it is erroring as undefined for $I believe $ defintion is missing and I need Jquery to install but in many of areas in code it is working without that how that working?
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/1ff58bb1-2394-4f44-b41d-27651a2f9a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
TypeError: require(...).jsdom(...).createWindow is not a function
so trying now what I am missing seems jsdom is not being identified properly, so let me search what is wrong.
Hi,As you've mentioned user-authentication.js, I assume you are creating a custom authentication module as described here: http://nodered.org/docs/security#custom-user-authenticationThat module runs in the node.js runtime, not in the browser. If you really want to use jQuery in there, you can npm install it: https://www.npmjs.com/package/jQuery and require it into your module - see the examples from the jQuery module page.Nick
On 6 February 2017 at 04:46, Nitin Gautam <gautam...@gmail.com> wrote:
I am trying to call using ajax login API but it is erroring as undefined for $I believe $ defintion is missing and I need Jquery to install but in many of areas in code it is working without that how that working?
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
require("jsdom").env("", function(err, window) {
if (err) {
console.error(err);
return;
}
$ = require("jquery")(window);
});