Giter Club home page Giter Club logo

node-jquery's Introduction

OLD

Deprecated

Don't use the actual code in this repo. It's obsolete and only kept around for legacy apps. jquery added support for node in 2.1.x. Use that instead.

NEW: How to use jQuery >= 2.1.x in Node.js

How to use jQuery >= 2.x in Node.js >= 0.10

npm install -S 'jquery@>=2.1'
npm install -S '[email protected]'

(Note that version 3.1.2 of jsdom is required, because as of jsdom version 4.0.0, jsdom no longer works with Node.js. If you use Io.js rather than Node.js, you can use the latest 4.x release of jsdom.)

testjq.js:

(function () {
  'use strict';

  var env = require('jsdom').env
    , html = '<html><body><h1>Hello World!</h1><p class="hello">Heya Big World!</body></html>'
    ;

  // first argument can be html string, filename, or url
  env(html, function (errors, window) {
    console.log(errors);

    var $ = require('jquery')(window)
      ;

    console.log($('.hello').text());
  });
}());

The instructions above are for the new official jquery which, for some reason, doesn't have instructions for node in their README.

node-jquery's People

Contributors

azatoth avatar elliotttf avatar embeepea avatar laurie71 avatar linuxwolf avatar mreinstein avatar netroy avatar squanto avatar tf avatar treasonx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-jquery's Issues

jsdom defines a noOp function for XMLHttpRequest

The recent version of jsdom has defined a noOp function for XMLHttpRequest, this is now breaking $.ajax. I am using a workaround by doing the following in my code:

var window = require('jsdom').jsdom().createWindow();
window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var $ = require('jquery').create(window);

But, please fix.

New version?

Any chance of pushing a new version, to pick up the post-1.6.2 fixes?

Missing dependencies

Hi,

My config :

  • Windows x86
  • Python 2.7.3
  • node 0.6.19
  • npm 1.1.24

I've installed node-jquery via npm. Contextify install failed for whatever reason, but as it's optional, the install was successfully.
Complete install log : http://pastebin.com/21NB4xBf

When trying to use it : var $ = require('node-jquery');

> var $ = require('node-jquery');
Error: Cannot find module 'location'
    at Function._resolveFilename (module.js:337:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:359:17)
    at require (module.js:375:17)
    at create (C:\Users\magnetik\Documents\workspace\maniaplanet-ws-js-sdk\node_
modules\node-jquery\node_modules\jQuery\node-jquery.js:6:33)
    at C:\Users\magnetik\Documents\workspace\maniaplanet-ws-js-sdk\node_modules\
node-jquery\node_modules\jQuery\node-jquery.js:9065:18
    at Object.<anonymous> (C:\Users\magnetik\Documents\workspace\maniaplanet-ws-
js-sdk\node_modules\node-jquery\node_modules\jQuery\node-jquery.js:9067:1)
    at Module._compile (module.js:446:26)
    at Object..js (module.js:464:10)
    at Module.load (module.js:353:31)

So I guess that the module location is missing.

Don't hesitate to ask me for more information.

XMLHttpRequest

XMLHttpRequest npm package is finally available. It would be awesome to see it in Your jquery package. Yet more awesome would be browserify support for using the same module on both client- and server- side.

"ReferenceError: $ is not defined" when using node-jquery in Express

Hi,

I'm using the Express framework in node.js and I import node-jquery library at the beginning of my .js file:
var jQuery = require('jQuery');

Later on, in my app.get() methods I would like to use some jQuery methods. Unfortunately, when I try calling any functions, such as $.each or $.get I get a reference error: $ is not defined. The same happens also if I try using jQuery.each.

Any ideas what am I doing wrong here? The example with $.getJSON() call to twitter works for me so I guess the problem has to be related to Express. Does anybody have any example of using jQuery in Express?

Thanks,
gregor

Locking dependency versions

Thanks for this module - it's very helpful!

Problem I'm finding is that JSDom is a little unreliable. The latest version (0.2.10) is blowing up on Ubuntu when NPM is updated. 0.2.9 is not.

I was wondering if you could lock your dependency on this library to a fixed version, that works, please? I'm not referencing JSDOM directly, but my deployment is breaking because JQuery is referencing it - and I can't do anything about that.

Thanks!

Problem with [name~="value"] selector

Hi there
I'm having a problem with the [name~="value"] selector in some of my code (I'll work around it for now)

the following code:

$('<div><p data-thing="hello there"></p></div>').find('[data-thing~="hello"]')

should return the jquerified "p" element, but instead blows up with the following error:

TypeError: Cannot read property '0' of undefined
    at superMatcher (/Users/mark/dev/me/onionjs/node_modules/jquery/lib/node-jquery.js:5025:25)
    at select (/Users/mark/dev/me/onionjs/node_modules/jquery/lib/node-jquery.js:5192:28)
    at Function.Sizzle [as find] (/Users/mark/dev/me/onionjs/node_modules/jquery/lib/node-jquery.js:3962:9)
    at jQuery.fn.extend.find (/Users/mark/dev/me/onionjs/node_modules/jquery/lib/node-jquery.js:5410:11)
    at repl:1:51
    at REPLServer.self.eval (repl.js:111:21)
    at Interface.<anonymous> (repl.js:250:12)
    at Interface.EventEmitter.emit (events.js:93:17)
    at Interface._onLine (readline.js:199:10)
    at Interface._line (readline.js:517:8)

The following code:

$('<p data-thing="hello there"></p>').is('[data-thing~="hello"]')

works fine, so I guess the problem arises when combining the "~=" selector with find.

Thanks

Conflict with html

I'm getting this error

$(function() {
^
TypeError: Property '$' of object [object DOMWindow] is not a function

I cannot change the site sourcecode.

jQuery doesn't work on node 0.10.0

Note from repo owner: Just so everyone knows the state and future of the npm jQuery package, please see this Issue #59

Is it possible that jQuery's not working on node 0.10.0?
I'm getting this error:

/home/skerit/Projecten/elric-server/hawkejs/node_modules/jquery/lib/node-jquery.js:10
    window.XMLHttpRequest.prototype.withCredentials = false;
                         ^
TypeError: Cannot read property 'prototype' of undefined
    at create (/home/skerit/Projecten/elric-server/hawkejs/node_modules/jquery/lib/node-jquery.js:10:26)
    at /home/skerit/Projecten/elric-server/hawkejs/node_modules/jquery/lib/node-jquery.js:9503:18
    at Object.<anonymous> (/home/skerit/Projecten/elric-server/hawkejs/node_modules/jquery/lib/node-jquery.js:9505:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/skerit/Projecten/elric-server/hawkejs/lib/hawkejs.js:5:14)

navigator is not defined

$ node -v
v0.2.5

$ npm install jquery

test.js:

var $ = require('jquery');

$("<h1>test passes</h1>").appendTo("body");
console.log($("body").html());

$ node test.js

node.js:63
throw e;
^
ReferenceError: navigator is not defined
at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:85:14
at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:917:4
at create (/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6895:4)
at /home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6899:18
at Object. (/home/alfred/local/lib/node/.npm/jquery/1.4.3/package/lib/jquery-1.4.3.js:6903:1)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)

Cannot read property 'prototype' of undefined

I typed
npm install jquery

and run a simple test with content
var $ = require("jquery");

When I run it with
node simpletest.js

I get such an error:

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'prototype' of undefined
at create (/Users/spud/node_modules/jQuery/lib/node-jquery.js:10:26)
at /Users/spud/node_modules/jQuery/lib/node-jquery.js:9435:18
at Object. (/Users/spud/node_modules/jQuery/lib/node-jquery.js:9437:1)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object. (/Users/spud/Node/jq/simpletest.js:1 :71)

It seems that the properties of the object created with require('jsdom').jsdom().createWindow() can't be set,
so the window object is still {} after "window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;"
Any suggestion?

ERROR install jquery on CentOS

[email protected] install /home/Grab/node_modules/jquery/node_modules/contextify
node-gyp rebuild

npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/request
/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py:852: Warning: 'as' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 15, in
import gyp
File "/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in
import gyp.input
File "/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 852
except ImportError as e:
^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.18-92.el5
gyp ERR! command "node" "/usr/local/node-v0.10.15-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/Grab/node_modules/jquery/node_modules/contextify
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! Error: ENOENT, lstat '/home/Grab/node_modules/jquery/node_modules/jsdom/node_modules/request/tests/server.js'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

I success fixed my error when building node-jquery/jsdom/contextify

The causation which impinge my build is quiet simple,but the error msg hardly gives a clue so It speed me much time to find out.so I think it might be helpful if I write it done.

OS:windows 8 64bit
node:v0.10.17
gyp:v0.10.9
python:v2.7.5

the error is first been caused by "stack Error: spawn ENOENT"
this is because I mistakely create the envirment var "PYTHON" instead of "PYTHON_HOME"

then I meet a MSBUILD ERROR MSB8008.
this may help:
http://www.gabrewer.com/
http://stackoverflow.com/questions/10280956/how-to-use-msbuild-to-target-v110-platform-toolset
P.S: I fixed that by create a envirment var "PlatformToolset=11.0"

Unable to select <script> tags

Hi,

Let me first just say, this is a very cool project. It's been very helpful for me so far.

One thing I haven't been able to do is select script tags. I've written something like

$(htmlcontent).find("script").attr("src")     // undefined

This will always return undefined. The code does work for link elements though. I'm not sure if this is a node-query issue, a jsdom issue, or a jquery issue, but either way I'd really appreciate anyone's insight on this problem!

webkit browsers lose XMLHttpRequest object

Please change the following line in header.js and node-jquery.js:

if ('function' !== typeof window.XMLHttpRequest && 'function' !== typeof window.ActiveXObject) {

to:

if (('function' !== typeof window.XMLHttpRequest && 'object' !== typeof window.XMLHttpRequest) && 'function' !== typeof window.ActiveXObject) {

Otherwise webkit browsers don't function when xhr transport is chosen.

chek,

Maurice

stream.js unhandled stream error in pipe

I'm using jQuery to do some AJAX calls. Every now and then, the server I'm talking to will be overloaded and either give me "socket hang up" or "connection reset" style error.

When these happen, these errors are not being handled properly. Here is an example:

stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: socket hang up
at createHangUpError (http.js:1472:15)
at Socket.socketOnEnd as onend
at Socket.g (events.js:175:14)
at Socket.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)

Group matcher works in client jQuery but not on Node version

The following group matcher works fine on the client-side with jQuery (1.8.3):

$('html').find('link[type="application/rss+xml"], link[type="application/atom+xml"]').attr('href')

But when I try to use it with the Node version of jQuery (1.8.3), I get this error:

 TypeError: Cannot read property '0' of undefined
  at superMatcher (/Users/Oliver/Development/GitHub/parsse/node_modules/jquery/lib/node-jquery.js:5026:25)
  at select (/Users/Oliver/Development/GitHub/parsse/node_modules/jquery/lib/node-jquery.js:5193:28)
  at Function.Sizzle [as find] (/Users/Oliver/Development/GitHub/parsse/node_modules/jquery/lib/node-jquery.js:3962:9)
  at jQuery.fn.extend.find (/Users/Oliver/Development/GitHub/parsse/node_modules/jquery/lib/node-jquery.js:5411:11)

attr("name") doesn't work

attr("name") get the tag name in CAPS.

Expected behavior is to get the attribute with the name "name".

Example code:

$ = jQuery = require("jquery")
jsdom = require("jsdom").jsdom

e = jsdom('<element name="dude" age="25">content</element>');
q = $("element", e);

console.log("content: " + q.text());  // content
console.log("name: " + q.attr("name")); // ELEMENT
console.log("name: " + q[0].getAttribute("name")); // dude
console.log("age: " + q.attr("age")); // 25

output:

$ node test.js 
content: content
name: ELEMENT
name: dude
age: 25

Cannot read property 'prototype' of undefined (after window.XMLHttpRequest.prototype.withCredentials = false;)

Hello,

I got this issue after requiring jquery.

My test page is just the following line of code:

var jQuery = require('jquery');

I am running an OSX 10.8.2 Machine with:

  • latest XCode installed
  • node.js version 0.8.14
  • NPM version 1.1.65

As suggested in a comment inside previous (closed) issue, i ran

npm init inside a different dir and then npm install jquery.

This is the output:

npm install jquery
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/jquery
npm http 304 https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/navigator
npm http GET https://registry.npmjs.org/location/0.0.1
npm http 304 https://registry.npmjs.org/navigator
npm http 304 https://registry.npmjs.org/htmlparser/1.7.6
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http 304 https://registry.npmjs.org/location/0.0.1
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

[email protected] install /Users/cerdrifix/test/node_modules/jquery/node_modules/jsdom/node_modules/contextify
node-gyp rebuild

CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:1:
/Users/cerdrifix/.node-gyp/0.8.14/src/node.h:61:10: fatal error: 'uv.h' file not found

include "uv.h"

     ^

1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:236:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.2.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cerdrifix/test/node_modules/jquery/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.8.14
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules/jquery
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected] ([email protected], [email protected], [email protected])

Inside new dir (test) I created a file named test.js containing the following code:
var jQuery = require('jquery');

and after running node test.js the error is the same as before:

/Users/cerdrifix/test/node_modules/jquery/lib/node-jquery.js:10
window.XMLHttpRequest.prototype.withCredentials = false;
^
TypeError: Cannot read property 'prototype' of undefined
at create (/Users/cerdrifix/test/node_modules/jquery/lib/node-jquery.js:10:26)
at /Users/cerdrifix/test/node_modules/jquery/lib/node-jquery.js:9471:18
at Object. (/Users/cerdrifix/test/node_modules/jquery/lib/node-jquery.js:9473:2)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/Users/cerdrifix/test/test.js:1:76)

Thank you

$.parseXML doesn't work.

For example, try

$.parseXML('<root><item /></root>')

This can be fixed by adding DOMParser in the wrapper function (the one that the npm package xmldom provides seems to be okay so far). If I patch my node-jquery.js like this:

diff -u -r a/node_modules/jquery/lib/node-jquery.js b/node_modules/jquery/lib/node-jquery.js
--- a/node_modules/jquery/lib/node-jquery.js    2012-07-01 17:07:32.000000000 +0100
+++ b/node_modules/jquery/lib/node-jquery.js    2012-10-16 16:50:14.034476120 +0100
@@ -19,6 +19,8 @@
   }


+  window.DOMParser = require('xmldom').DOMParser;
+  var DOMParser = window.DOMParser;
   var location = window.location,
       navigator = window.navigator,
       XMLHttpRequest = window.XMLHttpRequest;

then it works.

Obviously one should add xmldom to the package.json if you do this.

Does this work?

I'm getting errors all over the place, you fix/comment out one and it brings up a completely different and new one.

The first error I'm getting is that the XMLHttpRequest is coming back undefined when included.

The second error I'm getting is that the Navigator.UserAgent is coming back with an error since Navigator is undefined.

Any ideas??

Binding events and trigger them

Hello to everybody,

I'm newbie with jquery on server-side and I have some problems wrapping events on dynamic objects. For example, I have added dynamically links in menu layer with this code on server-side:

$('<a>')
  .addClass('item')
  .on('click', function(event) { 
       event.preventDefault(); 
       alert("Click event is triggered successfully"); 
  })
  .appendTo($('div.menu'));

On client, I can see all links but never can trigger click's event.

Could anybody tell me how can I transport events between server-side and client-side? I have read about socket and emmiter but I don't understand quit well how to do it.

Kind regards,
Ivรกn Rubio

npm fails on windows 7 x64 on command node_gyp.js configure

system: Windows7 x64, node.js x64. python 2.7.3.
trying to install pg or sqlite3. both call node-gyp.js rebuild - and that causes an error.
sorry, I have russian windows - that causes "???"

D:\job\TimeRecordService>npm install sqlite3
npm http GET https://registry.npmjs.org/sqlite3
npm http 200 https://registry.npmjs.org/sqlite3
npm http GET https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.5.tgz
npm http 200 https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.5.tgz

[email protected] install D:\job\TimeRecordService\node_modules\sqlite3
node-gyp rebuild

D:\job\TimeRecordService\node_modules\sqlite3>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: CreateProcessW: ???????? ? ???????.
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:540:15)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
gyp ERR! stack at Socket.EventEmitter.emit (events.js:88:17)
gyp ERR! stack at Socket._destroy.destroyed (net.js:357:10)
gyp ERR! stack at process.startup.processNextTick.process._tickCallback (node.js:244:9)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuil
d"
gyp ERR! cwd D:\job\TimeRecordService\node_modules\sqlite3
gyp ERR! node -v v0.8.9
gyp ERR! node-gyp -v v0.6.8
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1

Error installing on Windows

Hi,

My system :

  • Windows 7 x64 Ultimate
  • Python latest 2.7
  • Microsoft Visual C++ express 2010
  • node 0.6.17
  • npm 1.1.21

After npm install jQuery I got this error :

> node-gyp rebuild


C:\Documents and Settings\magnetik\Documents\NetBeansProjects\maniaplanet-ws-js-
sdk\node_modules\jQuery\node_modules\jsdom\node_modules\contextify>node "C:\Prog
ram Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\nod
e-gyp\bin\node-gyp.js" rebuild
info it worked if it ends with ok
CreateProcessW: spawn Access denied
B:\python2.7 [ 'C:\\Users\\magnetik\\.node-gyp\\0.6.17\\tools\\gyp_addon',
  'binding.gyp',
  '-IC:\\Documents and Settings\\magnetik\\Documents\\NetBeansProjects\\maniapla
net-ws-js-sdk\\node_modules\\jQuery\\node_modules\\jsdom\\node_modules\\contexti
fy\\build\\config.gypi',
  '-f',
  'msvs',
  '-G',
  'msvs_version=2010' ]
ERR! Error: `gyp_addon` failed with exit code: 127
    at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:226:16)
    at ChildProcess.emit (events.js:70:17)
    at maybeExit (child_process.js:362:16)
    at Process.onexit (child_process.js:398:5)
ERR! not ok

Full log : http://pastebin.com/8vWqNUMH

I tried to start it with an administrator command line, nothing better.

window.JSON.parse != JSON.parse

I'm trying to use node-jquery with mocha + should.js. The issue rears its head when I try to access a javascript object returned from the jquery ajax callbacks. The following fails:

var $ = require("jquery");
var should = require("should");

$.getJSON("http://localhost:8080/api/ping").done(function(data) {
    data.should.have.property("message");
});

because data.should is undefined. On deeper inspection with node-inspector, I was able to find out that the window.JSON object used in $.parseJSON is different from the native JSON object that node.js exposes, and is deficient in some way because the should property, which has been added to Object.prototype is not available for objects created using window.JSON.

After mucking around node-jquery, jsdom and contextify for a long time, I have given up and just made the following modification to my node_modules/jquery/lib/node-jquery.js file:

@@ -9429,6 +9429,7 @@
 })( window );


+  window.JSON = JSON;
   window.jQuery.noConflict();
   return window.jQuery;
 }

I am pretty sure that this is not the right way to do it, but maybe this hack might be useful for some other fellow traveller. You might be better informed as to where to make this change.

Fix jQuery's script element handling

jQuery has some (intended) bugs when handling script elements. E.g. appended script elements are not added but their code is executed directly. Obviously this does not work server-side.

npm deployed package does not include dependencies

When running 'npm install jQuery', the installed package does not include any dependencies.

Looking at its package.json, it appears that "dependencies" was renamed "_ _ dependencies" (and "devDependencies" renamed "_ _ devDependencies") (minus spaces)

The state and future of the jquery npm package(s)

This is a discussion that started Dec 26th 2012 and has slowly continued intermittently to the present. I felt that it was appropriate to bring it into the open for all those confused about the state and future of the package and it's relation to me, the jQuery team, and the node team.

From @isaacs

Hey, guys.

Domenic asked recently on twitter why it is that both "jquery" and
"jQuery" on npm are jsdom-dependent things, and not actually jQuery.
There's also jquery-browser, jqueryify, jquery-browserify, etc., which
are all basically the same thing.

There are several browser libs in npm already, and it seems odd that
jquery is not one of them (without requiring jsdom). Also,
browserified client-side libs shouldn't really need their own thing if
the lib in question exposes a node-like module interface.

How would you all feel about the jquery core team maintaining this
package in npm?

All that would have to be added to jquery to make this work would be a
minimal shim (something like the requirejs bits near the botom, but
assigning $ to module.exports) and to replace the word "window" on the
last line with "this" (which would be the same in all browsers, but
also work in node.)

Can't install node-jquery on win7 64bit

OS: win7 Pro 64bit
NodeJS: v0.8.12

try to "npm install jquery"
and get the result under:
Help please, Thank you!

c:\Program Files\nodejs>npm install jquery
npm http GET https://registry.npmjs.org/jquery
npm http 304 https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/location/0.0.1
npm http GET https://registry.npmjs.org/navigator
npm http 304 https://registry.npmjs.org/location/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http 304 https://registry.npmjs.org/navigator
npm http 304 https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

[email protected] install c:\Program Files\nodejs\node_modules\jquery\node_modu
les\jsdom\node_modules\contextify
node-gyp rebuild

c:\Program Files\nodejs\node_modules\jquery\node_modules\jsdom\node_modules\cont
extify>node "c:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\no
de_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (c:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:109:14)
gyp ERR! stack at c:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:78:11
gyp ERR! stack at Object.oncomplete (fs.js:297:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Program Files\nodejs\node_modules\jquery\node_modules\jsdom\node
_modules\contextify
gyp ERR! node -v v0.8.12
gyp ERR! node-gyp -v v0.7.0
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\jquery
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected] ([email protected], [email protected], [email protected])

c:\Program Files\nodejs>

Node-Gyp Rebuild failed on my CentOS Server

Is there a way to explicitly tell this command which version of python to use?

I get the following errors when I run npm install jquery:

gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not support
ed by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & <
3.0.0.
gyp ERR! stack at failPythonVersion (/usr/lib/node_modules/npm/node_modules/
node-gyp/lib/configure.js:118:14)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/config
ure.js:107:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:538:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at maybeClose (child_process.js:638:16)
gyp ERR! stack at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
gyp ERR! stack at Socket.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Socket._destroy.destroyed (net.js:358:10)
gyp ERR! stack at process.startup.processNextTick.process._tickCallback (nod
e.js:244:9)
gyp ERR! System Linux 2.6.18-308.24.1.el5xen
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/nod
e-gyp.js" "rebuild"
gyp ERR! cwd /home/woohoowebs.com/domains/laser.woohoowebs.com/laser.js/node_mod
ules/jquery/node_modules/contextify
gyp ERR! node -v v0.8.17
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! sh "-c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.18-308.24.1.el5xen
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "jquery"
npm ERR! cwd /home/woohoowebs.com/domains/laser.woohoowebs.com/laser.js
npm ERR! node -v v0.8.17
npm ERR! npm -v 1.2.0
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/woohoowebs.com/domains/laser.woohoowebs.com/laser.js/npm-debu
g.log
npm ERR! not ok code 0

npm install jquery -> no htmlparser

I think this error can be fixed by a small change to the package.json?

When I ran npm install htmlparser, everything was fixed.

###########################################################
#  WARNING: No HTML parser could be found.
#  Element.innerHTML setter support has been disabled
#  Element.innerHTML getter support will still function
#  Download: http://github.com/tautologistics/node-htmlparser
###########################################################

Attribute selector jQuery('[attribute]') doesn't work

File jquery.html

<div>
    <span id="foo"></span>
    <span id="bar" data-test="test"></span>
    <span id="baz"></span>
</div>

File jquery.js

fs = require('fs');
$ = require('jquery');
filename = 'jquery.html';
fs.readFile(filename, 'utf8', function (err, html) {
    $('[data-test]', html).each(function (i, el) {
        console.log(el.id);
    });
});

I would expect it to output only bar, but I get all three elements matched!

Error when requiring module in repl mode

Doing:

var $ = require('jquery');

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?

Why cannot we install the newest version ?

When I install the node-jquery by executing command npm install jquery, I got the version 1.8.3 installed. Why cann't I install the version 2.x.x ?
And by executing npm info jquery we got:

{ name: 'jquery',
  description: 'jQuery: The Write Less, Do More, JavaScript Library (packaged for Node.JS)',
  'dist-tags': { latest: '1.8.3' },
  versions:
   [ '1.5.1',
     '1.6.2',
     '1.6.3',
     '1.7.2',
     '1.7.3',
     '1.8.2',
     '1.8.3' ],
  maintainers:
   [ 'coolaj86 <[email protected]>',
     'treasonx <[email protected]>' ],
  time:
   { '1.5.1': '2011-03-19T07:19:56.956Z',
     '1.6.2': '2011-07-06T16:13:21.519Z',
     '1.6.3': '2011-09-12T19:05:34.373Z',
     '1.7.2': '2012-05-01T11:14:09.090Z',
     '1.7.3': '2012-07-01T16:11:53.194Z',
     '1.8.2': '2012-11-11T22:43:58.910Z',
     '1.8.3': '2012-12-01T00:03:02.297Z' },
  author: 'James Morrin <[email protected]>',
  users: { dodo: true, fgribreau: true },
  repository:
   { type: 'git',
     url: 'git://github.com/coolaj86/node-jquery.git' },
  version: '1.8.3',
  url: 'http://jquery.com',
  homepage: 'https://github.com/coolaj86/node-jquery',
  bugs: { url: 'https://github.com/coolaj86/node-jquery/issues' },
  licenses:
   { type: 'MIT',
     url: 'https://github.com/coolaj86/node-jquery/blob/master/LICENSE-MIT' },
  main: 'lib/node-jquery',
  engines: { node: '>=0.6' },
  scripts: { test: 'grunt test' },
  dependencies:
   { jsdom: '~0.2.14',
     htmlparser: '1.7.6',
     xmlhttprequest: '~1.4.2',
     location: '0.0.1',
     navigator: '~1.0.1',
     contextify: '~0.1.3' },
  devDependencies: { grunt: '~0.3.8', nodeunit: '~0.7.4' },
  keywords: [ 'util', 'dom', 'jquery' ],
  dist:
   { shasum: 'cfa2941c05a83d966f21347f759a6d15281c60cc',
     tarball: 'http://registry.npmjs.org/jquery/-/jquery-1.8.3.tgz' },
  directories: {} }

May be this module should be updated. I need the new version of jQuery for some special features. Thanks.

npm update jquery and now jsdom not working

I just ran npm update, and it complains:

TypeError: Object #<Object> has no method 'jsdom'
    at create (/Users/cjroebuck/Dev/Quillu/foto/node_modules/jquery/node-jquery.js:5:39)
    at /Users/cjroebuck/Dev/Quillu/foto/node_modules/jquery/node-jquery.js:9066:18
    at Object.<anonymous> (/Users/cjroebuck/Dev/Quillu/foto/node_modules/jquery/node-jquery.js:9068:1)

jquery is version 1.6.3

reverting to [email protected] fixes this issue

not working on win 7 64 bit with appjs

Two issues

There appears to be two modules registered with npm; jquery and jQuery, the latter doesn't install any node_modules under the jQuery folder, whereas the former does.

However I haven't been able to get either module to work on my win 7 64 bit machine also using appjs.

error install jquery in Mac OSX

~ $ npm install jquery
npm http GET https://registry.npmjs.org/jquery
npm http 200 https://registry.npmjs.org/jquery
npm http GET https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/htmlparser/1.7.6
npm http GET https://registry.npmjs.org/location/0.0.1
npm http GET https://registry.npmjs.org/navigator
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/htmlparser/1.7.6
npm http 304 https://registry.npmjs.org/navigator
npm http 304 https://registry.npmjs.org/location/0.0.1
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/xmlhttprequest
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/bindings

[email protected] install /Users/leslie/node_modules/jquery/node_modules/contextify
node-gyp rebuild

npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
CXX(target) Release/obj.target/contextify/src/contextify.o
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/async
../src/contextify.cc:22:39: error: 'New' is a private member of 'v8::Persistentv8::Object'
sandbox = Persistent::New(sbox);
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:23: note: declared private here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:22:47: error: too few arguments to function call, expected 2, have 1
sandbox = Persistent::New(sbox);
~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:3: note: 'New' declared here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:31: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                          ^

../src/contextify.cc:40:21: error: 'operator=' is a private member of 'v8::Persistentv8::Context'
context = createV8Context();
~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:753:25: note: declared private here
V8_INLINE(Persistent& operator=(const Persistent& that)) { // NOLINT
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:40:23: warning: C++98 requires an accessible copy constructor for class 'v8::Persistentv8::Context' when binding a
reference to a temporary; was private [-Wbind-to-temporary-copy]
context = createV8Context();
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:751:13: note: declared private here
V8_INLINE(Persistent(const Persistent& that)) : val_(that.val_) {}
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:41:43: error: 'New' is a private member of 'v8::Persistentv8::Object'
proxyGlobal = Persistent::New(context->Global());
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:23: note: declared private here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:41:54: error: 'operator->' is a private member of 'v8::Persistentv8::Context'
proxyGlobal = Persistent::New(context->Global());
~~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:41:64: error: too few arguments to function call, expected 2, have 1
proxyGlobal = Persistent::New(context->Global());
~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:3: note: 'New' declared here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:31: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                          ^

../src/contextify.cc:51:48: error: 'operator->' is a private member of 'v8::Persistentv8::Function'
Local wrapper = dataWrapperCtor->NewInstance();
~~~~~~~~~~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:64:36: error: 'operator->' is a private member of 'v8::Persistentv8::Object'
ftmpl->SetClassName(sandbox->GetConstructorName());
~~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:66:16: warning: 'SetNamedPropertyHandler' is deprecated [-Wdeprecated-declarations]
otmpl->SetNamedPropertyHandler(GlobalPropertyGetter,
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:3460:22: note: 'SetNamedPropertyHandler' declared here
V8_DEPRECATED(void SetNamedPropertyHandler(
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:88:35: note: expanded from macro 'V8_DEPRECATED'

define V8_DEPRECATED(declarator) declarator attribute ((deprecated))

                              ^

../src/contextify.cc:74:25: warning: 'New' is deprecated [-Wdeprecated-declarations]
return Context::New(NULL, otmpl);
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:4961:44: note: 'New' declared here
V8_DEPRECATED(static Persistent New(
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:88:35: note: expanded from macro 'V8_DEPRECATED'

define V8_DEPRECATED(declarator) declarator attribute ((deprecated))

                              ^

../src/contextify.cc:74:16: warning: C++98 requires an accessible copy constructor for class 'v8::Persistentv8::Context' when binding a
reference to a temporary; was private [-Wbind-to-temporary-copy]
return Context::New(NULL, otmpl);
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:751:13: note: declared private here
V8_INLINE(Persistent(const Persistent& that)) : val_(that.val_) {}
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:74:16: error: calling a private constructor of class 'v8::Persistentv8::Context'
return Context::New(NULL, otmpl);
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:751:13: note: declared private here
V8_INLINE(Persistent(const Persistent& that)) : val_(that.val_) {}
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:79:57: error: 'New' is a private member of 'v8::Persistentv8::FunctionTemplate'
dataWrapperTmpl = Persistent::New(FunctionTemplate::New());
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:23: note: declared private here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:79:84: error: too few arguments to function call, expected 2, have 1
dataWrapperTmpl = Persistent::New(FunctionTemplate::New());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:3: note: 'New' declared here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:31: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                          ^

../src/contextify.cc:80:24: error: 'operator->' is a private member of 'v8::Persistentv8::FunctionTemplate'
dataWrapperTmpl->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~~~~~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:81:49: error: 'New' is a private member of 'v8::Persistentv8::Function'
dataWrapperCtor = Persistent::New(dataWrapperTmpl->GetFunction());
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:23: note: declared private here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:81:68: error: 'operator->' is a private member of 'v8::Persistentv8::FunctionTemplate'
dataWrapperCtor = Persistent::New(dataWrapperTmpl->GetFunction());
~~~~~~~~~~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:81:83: error: too few arguments to function call, expected 2, have 1
dataWrapperCtor = Persistent::New(dataWrapperTmpl->GetFunction());
~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:3: note: 'New' declared here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:31: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                          ^

../src/contextify.cc:83:48: error: 'New' is a private member of 'v8::Persistentv8::FunctionTemplate'
jsTmpl = Persistent::New(FunctionTemplate::New(New));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:23: note: declared private here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:83:70: warning: 'New' is deprecated [-Wdeprecated-declarations]
jsTmpl = Persistent::New(FunctionTemplate::New(New));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:3293:48: note: 'New' declared here
V8_DEPRECATED(static Local New(
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:88:35: note: expanded from macro 'V8_DEPRECATED'

define V8_DEPRECATED(declarator) declarator attribute ((deprecated))

                              ^

../src/contextify.cc:83:78: error: too few arguments to function call, expected 2, have 1
jsTmpl = Persistent::New(FunctionTemplate::New(New));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:782:3: note: 'New' declared here
V8_INLINE(static T* New(Isolate* isolate, T* that));
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:31: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                          ^

../src/contextify.cc:84:15: error: 'operator->' is a private member of 'v8::Persistentv8::FunctionTemplate'
jsTmpl->InstanceTemplate()->SetInternalFieldCount(1);
~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

../src/contextify.cc:85:15: error: 'operator->' is a private member of 'v8::Persistentv8::FunctionTemplate'
jsTmpl->SetClassName(String::NewSymbol("ContextifyContext"));
~~~~~~^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:771:16: note: declared private here
V8_INLINE(T* operator->() const) { return val_; }
^
/Users/leslie/.node-gyp/0.11.5/deps/v8/include/v8.h:80:69: note: expanded from macro 'V8_INLINE'

define V8_INLINE(declarator) inline attribute((always_inline)) declarator

                                                                ^

fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm http 304 https://registry.npmjs.org/ctype/0.5.2
5 warnings and 20 errors generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/leslie/.nvm/v0.11.5/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:103:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:794:12)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/Users/leslie/.nvm/v0.11.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! npm http 304 https://registry.npmjs.org/asn1/0.1.11
cwd /Users/leslie/node_modules/jquery/node_modules/contextify
gyp ERR! node -v v0.11.5
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/hoek
npm ERR! Error: ENOENT, lstat '/Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/component.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Darwin 12.4.0
npm ERR! command "/Users/leslie/.nvm/v0.11.5/bin/node" "/Users/leslie/.nvm/v0.11.5/bin/npm" "install" "jquery"
npm ERR! cwd /Users/leslie
npm ERR! node -v v0.11.5
npm ERR! npm -v 1.3.6
npm ERR! path /Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/component.json
npm ERR! fstream_path /Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/component.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /Users/leslie/.nvm/v0.11.5/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:96:15)
npm http 304 https://registry.npmjs.org/cryptiles
npm ERR! Error: ENOENT, lstat '/Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Darwin 12.4.0
npm ERR! command "/Users/leslie/.nvm/v0.11.5/bin/node" "/Users/leslie/.nvm/v0.11.5/bin/npm" "install" "jquery"
npm ERR! cwd /Users/leslie
npm ERR! node -v v0.11.5
npm ERR! npm -v 1.3.6
npm ERR! path /Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
npm ERR! fstream_path /Users/leslie/node_modules/jquery/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /Users/leslie/.nvm/v0.11.5/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:96:15)
npm ERR! weird error 1
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/leslie/npm-debug.log
npm ERR! not ok code 0
~ $

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.