Giter Site home page Giter Site logo

tootallnate / node-weak Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bnoordhuis/node-weakref

237.0 11.0 52.0 136 KB

Make weak references to JavaScript Objects. Fire a callback when they're garbage collected.

License: ISC License

Python 0.95% JavaScript 48.72% C++ 50.33%

node-weak's Introduction

node-weak

Make weak references to JavaScript Objects.

Build Status

On certain rarer occasions, you run into the need to be notified when a JavaScript object is going to be garbage collected. This feature is exposed to V8's C++ API, but not to JavaScript.

That's where node-weak comes in! This module exports V8's Persistent<Object> functionality to JavaScript. This allows you to create weak references, and optionally attach a callback function to any arbitrary JS object. The callback function will be invoked right before the Object is garbage collected (i.e. after there are no more remaining references to the Object in JS-land).

This module can, for example, be used for debugging; to determine whether or not an Object is being garbage collected as it should. Take a look at the example below for commented walkthrough scenario.

Installation

Install with npm:

$ npm install weak

Example

Here's an example of calling a cleanup() function on a Object before it gets garbage collected:

var weak = require('weak')

// we are going to "monitor" this Object and invoke "cleanup"
// before the object is garbage collected
var obj = {
    a: true
  , foo: 'bar'
}

// Here's where we set up the weak reference
var ref = weak(obj, function () {
  // `this` inside the callback is the EventEmitter.
  console.log('"obj" has been garbage collected!')
})

// While `obj` is alive, `ref` proxies everything to it, so:
ref.a   === obj.a
ref.foo === obj.foo

// Clear out any references to the object, so that it will be GC'd at some point...
obj = null

//
//// Time passes, and the garbage collector is run
//

// `callback()` above is called, and `ref` now acts like an empty object.
typeof ref.foo === 'undefined'

Weak Callback Function "Best Practices"

It's important to be careful when using the "callbacks" feature of node-weak, otherwise you can end up in a situation where the watched object will never be garbage collected.

You should not define the callback function in the same scope as the object that is being watched. It's often best to define the callback function at the highest scope possible (top-level being the best). Named functions work really well for this:

var http = require('http')
  , weak = require('weak')

http.createServer(function (req, res) {
  weak(req, gcReq)
  weak(res, gcRes)
  res.end('Hello World\n')
}).listen(3000)

function gcReq () {
  console.log('GC\'d `req` object')
}

function gcRes () {
  console.log('GC\'d `res` object')
}

API

Weakref weak(Object obj [, Function callback])

The main exports is the function that creates the weak reference. The first argument is the Object that should be monitored. The Object can be a regular Object, an Array, a Function, a RegExp, or any of the primitive types or constructor function created with new.

Optionally, you can set a callback function to be invoked before the object is garbage collected.

Object weak.get(Weakref ref)

get() returns the actual reference to the Object that this weak reference was created with. If this is called with a dead reference, undefined is returned.

Boolean weak.isDead(Weakref ref)

Checks to see if ref is a dead reference. Returns true if the original Object has already been GC'd, false otherwise.

Boolean weak.isWeakRef(Object obj)

Checks to see if obj is "weak reference" instance. Returns true if the passed in object is a "weak reference", false otherwise.

EventEmitter weak.addCallback(Weakref ref, Function callback)

Adds callback to the Array of callback functions that will be invoked before the Object gets garbage collected. The callbacks get executed in the order that they are added.

EventEmitter weak.removeCallback(Weakref ref, Function callback)

Removes callback from the Array of callback functions that will be invoked before the Object gets garbage collected.

EventEmitter weak.removeCallbacks(Weakref ref)

Empties the Array of callback functions that will be invoked before the Object gets garbage collected.

Array weak.callbacks(Weakref ref)

Returns an Array that ref iterates through to invoke the GC callbacks. This utilizes node's EventEmitter#listeners() function and therefore returns a copy in node 0.10 and newer.

node-weak's People

Contributors

19h avatar bnoordhuis avatar danfuzz avatar duralog avatar hackmod avatar iamstolis avatar imyller avatar kkoopa avatar laverdet avatar metamatt avatar robcolburn avatar rvagg avatar tootallnate 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

node-weak's Issues

Provide pre-compiled binaries

I know this is controversial, but can we get pre-compiled binaries?

node-weak is the only dependency in my app (out of a few hundred) that requires my Windows developers to install the Visual Studio toolchain (a process that can kill a whole day wrangling C++ redistributals). It also means I have to pre-build before I ship to Windows clients.

Install fails

Any idea why?

$ npm install weak
\
> weak@0.3.3 install /home/ionicabizau/Documents/invoices/node_modules/weak
> node-gyp rebuild

make: Entering directory '/home/ionicabizau/Documents/invoices/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
make: g++: Command not found
weakref.target.mk:84: recipe for target 'Release/obj.target/weakref/src/weakref.o' failed
make: *** [Release/obj.target/weakref/src/weakref.o] Error 127
make: Leaving directory '/home/ionicabizau/Documents/invoices/node_modules/weak/build'
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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.16.0-26-lowlatency
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ionicabizau/Documents/invoices/node_modules/weak
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Linux 3.16.0-26-lowlatency
npm ERR! argv "node" "/usr/local/bin/npm" "install" "weak"
npm ERR! node v0.10.32
npm ERR! npm  v2.1.2
npm ERR! code ELIFECYCLE

npm ERR! weak@0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the weak@0.3.3 install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ionicabizau/Documents/invoices/npm-debug.log

Content of npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'weak' ]
2 info using [email protected]
3 info using [email protected]
4 silly cache add args [ 'weak', null ]
5 verbose cache add spec weak
6 silly cache add parsed spec { raw: 'weak',
6 silly cache add   scope: null,
6 silly cache add   name: 'weak',
6 silly cache add   rawSpec: '',
6 silly cache add   spec: '*',
6 silly cache add   type: 'range' }
7 silly addNonLocal parsed spec { raw: 'weak',
7 silly addNonLocal   scope: null,
7 silly addNonLocal   name: 'weak',
7 silly addNonLocal   rawSpec: '',
7 silly addNonLocal   spec: '*',
7 silly addNonLocal   type: 'range' }
8 verbose addNamed weak@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'weak', range: '*', hasData: false }
12 verbose mapToRegistry name weak
13 verbose mapToRegistry uri https://registry.npmjs.org/weak
14 verbose request on initialization, where is /weak
15 verbose request after pass 1, where is /weak
16 verbose request url raw /weak
17 verbose request resolving registry [ 'https://registry.npmjs.org/', './weak' ]
18 verbose request after pass 2, where is https://registry.npmjs.org/weak
19 verbose request no auth needed
20 info attempt registry request try #1 at 12:04:26
21 verbose request id 078953c89d37dbaf
22 verbose etag "4FYI1V3DERRMM5HMRF660H4XG"
23 http request GET https://registry.npmjs.org/weak
24 http 304 https://registry.npmjs.org/weak
25 silly registry.get cb [ 304,
25 silly registry.get   { date: 'Fri, 12 Dec 2014 10:04:27 GMT',
25 silly registry.get     server: 'Apache',
25 silly registry.get     via: '1.1 varnish',
25 silly registry.get     'last-modified': 'Fri, 12 Dec 2014 10:04:27 GMT',
25 silly registry.get     'cache-control': 'max-age=60',
25 silly registry.get     etag: '"4FYI1V3DERRMM5HMRF660H4XG"',
25 silly registry.get     age: '0',
25 silly registry.get     'x-served-by': 'cache-ams4131-AMS',
25 silly registry.get     'x-cache': 'HIT',
25 silly registry.get     'x-cache-hits': '1',
25 silly registry.get     'x-timer': 'S1418378667.586443,VS0,VE377',
25 silly registry.get     vary: 'Accept',
25 silly registry.get     'content-length': '0',
25 silly registry.get     'keep-alive': 'timeout=10, max=50',
25 silly registry.get     connection: 'Keep-Alive' } ]
26 verbose etag https://registry.npmjs.org/weak from cache
27 silly addNameRange number 2 { name: 'weak', range: '*', hasData: true }
28 silly addNameRange versions [ 'weak',
28 silly addNameRange   [ '0.0.1',
28 silly addNameRange     '0.1.0',
28 silly addNameRange     '0.1.1',
28 silly addNameRange     '0.1.2',
28 silly addNameRange     '0.1.3',
28 silly addNameRange     '0.1.4',
28 silly addNameRange     '0.1.5',
28 silly addNameRange     '0.2.0',
28 silly addNameRange     '0.2.1',
28 silly addNameRange     '0.2.2',
28 silly addNameRange     '0.3.0',
28 silly addNameRange     '0.3.1',
28 silly addNameRange     '0.3.2',
28 silly addNameRange     '0.3.3' ] ]
29 verbose addNamed [email protected]
30 silly addNamed semver.valid 0.3.3
31 silly addNamed semver.validRange 0.3.3
32 silly install resolved [ { author: { name: 'Ben Noordhuis', email: '[email protected]' },
32 silly install resolved     contributors: [ [Object] ],
32 silly install resolved     name: 'weak',
32 silly install resolved     description: 'Make weak references to JavaScript Objects.',
32 silly install resolved     keywords:
32 silly install resolved      [ 'weak',
32 silly install resolved        'reference',
32 silly install resolved        'js',
32 silly install resolved        'javascript',
32 silly install resolved        'object',
32 silly install resolved        'function',
32 silly install resolved        'callback' ],
32 silly install resolved     version: '0.3.3',
32 silly install resolved     repository:
32 silly install resolved      { type: 'git',
32 silly install resolved        url: 'git://github.com/TooTallNate/node-weak.git' },
32 silly install resolved     main: 'lib/weak.js',
32 silly install resolved     scripts:
32 silly install resolved      { test: 'mocha -gc --reporter spec',
32 silly install resolved        install: 'node-gyp rebuild' },
32 silly install resolved     dependencies: { bindings: '*', nan: '~1.2.0' },
32 silly install resolved     devDependencies: { mocha: '~1.20.1' },
32 silly install resolved     gypfile: true,
32 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-weak/issues' },
32 silly install resolved     homepage: 'https://github.com/TooTallNate/node-weak',
32 silly install resolved     _id: '[email protected]',
32 silly install resolved     _shasum: '12ede888e3732f8634b4586102dcb620b5eb5311',
32 silly install resolved     _from: 'weak@*',
32 silly install resolved     _npmVersion: '1.4.9',
32 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
32 silly install resolved     maintainers: [ [Object], [Object] ],
32 silly install resolved     dist:
32 silly install resolved      { shasum: '12ede888e3732f8634b4586102dcb620b5eb5311',
32 silly install resolved        tarball: 'http://registry.npmjs.org/weak/-/weak-0.3.3.tgz' },
32 silly install resolved     directories: {},
32 silly install resolved     _resolved: 'https://registry.npmjs.org/weak/-/weak-0.3.3.tgz',
32 silly install resolved     readme: 'ERROR: No README data found!' } ]
33 info install [email protected] into /home/ionicabizau/Documents/invoices
34 info installOne [email protected]
35 verbose locking weak with /home/ionicabizau/.npm/_locks/weak-340264ce2fa49f33.lock
36 verbose unbuild node_modules/weak
37 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak
38 verbose tar unpack /home/ionicabizau/.npm/weak/0.3.3/package.tgz
39 verbose tar unpacking to /home/ionicabizau/Documents/invoices/node_modules/weak
40 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak
41 silly gunzTarPerm modes [ '775', '664' ]
42 silly gunzTarPerm extractEntry package.json
43 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ]
44 silly gunzTarPerm extractEntry .npmignore
45 silly gunzTarPerm modified mode [ '.npmignore', 420, 436 ]
46 silly gunzTarPerm extractEntry README.md
47 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ]
48 silly gunzTarPerm extractEntry LICENSE
49 silly gunzTarPerm modified mode [ 'LICENSE', 420, 436 ]
50 silly gunzTarPerm extractEntry History.md
51 silly gunzTarPerm modified mode [ 'History.md', 420, 436 ]
52 silly gunzTarPerm extractEntry appveyor.yml
53 silly gunzTarPerm modified mode [ 'appveyor.yml', 420, 436 ]
54 silly gunzTarPerm extractEntry .travis.yml
55 silly gunzTarPerm modified mode [ '.travis.yml', 420, 436 ]
56 silly gunzTarPerm extractEntry lib/weak.js
57 silly gunzTarPerm modified mode [ 'lib/weak.js', 420, 436 ]
58 silly gunzTarPerm extractEntry src/weakref.cc
59 silly gunzTarPerm modified mode [ 'src/weakref.cc', 420, 436 ]
60 silly gunzTarPerm extractEntry test/buffer.js
61 silly gunzTarPerm modified mode [ 'test/buffer.js', 420, 436 ]
62 silly gunzTarPerm extractEntry test/callback.js
63 silly gunzTarPerm modified mode [ 'test/callback.js', 420, 436 ]
64 silly gunzTarPerm extractEntry test/create.js
65 silly gunzTarPerm modified mode [ 'test/create.js', 420, 436 ]
66 silly gunzTarPerm extractEntry test/exports.js
67 silly gunzTarPerm modified mode [ 'test/exports.js', 420, 436 ]
68 silly gunzTarPerm extractEntry test/weakref.js
69 silly gunzTarPerm modified mode [ 'test/weakref.js', 420, 436 ]
70 silly gunzTarPerm extractEntry binding.gyp
71 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 436 ]
72 info preinstall [email protected]
73 silly cache add args [ 'bindings@*', null ]
74 verbose cache add spec bindings@*
75 silly cache add parsed spec { raw: 'bindings@*',
75 silly cache add   scope: null,
75 silly cache add   name: 'bindings',
75 silly cache add   rawSpec: '*',
75 silly cache add   spec: '*',
75 silly cache add   type: 'range' }
76 silly cache add args [ 'nan@~1.2.0', null ]
77 verbose cache add spec nan@~1.2.0
78 silly cache add parsed spec { raw: 'nan@~1.2.0',
78 silly cache add   scope: null,
78 silly cache add   name: 'nan',
78 silly cache add   rawSpec: '~1.2.0',
78 silly cache add   spec: '>=1.2.0 <1.3.0',
78 silly cache add   type: 'range' }
79 silly addNonLocal parsed spec { raw: 'bindings@*',
79 silly addNonLocal   scope: null,
79 silly addNonLocal   name: 'bindings',
79 silly addNonLocal   rawSpec: '*',
79 silly addNonLocal   spec: '*',
79 silly addNonLocal   type: 'range' }
80 verbose addNamed bindings@*
81 silly addNamed semver.valid null
82 silly addNamed semver.validRange *
83 silly addNameRange { name: 'bindings', range: '*', hasData: false }
84 verbose mapToRegistry name bindings
85 verbose mapToRegistry uri https://registry.npmjs.org/bindings
86 silly addNonLocal parsed spec { raw: 'nan@~1.2.0',
86 silly addNonLocal   scope: null,
86 silly addNonLocal   name: 'nan',
86 silly addNonLocal   rawSpec: '~1.2.0',
86 silly addNonLocal   spec: '>=1.2.0 <1.3.0',
86 silly addNonLocal   type: 'range' }
87 verbose addNamed nan@>=1.2.0 <1.3.0
88 silly addNamed semver.valid null
89 silly addNamed semver.validRange >=1.2.0 <1.3.0
90 silly addNameRange { name: 'nan', range: '>=1.2.0 <1.3.0', hasData: false }
91 verbose mapToRegistry name nan
92 verbose mapToRegistry uri https://registry.npmjs.org/nan
93 verbose request on initialization, where is /bindings
94 verbose request after pass 1, where is /bindings
95 verbose request url raw /bindings
96 verbose request resolving registry [ 'https://registry.npmjs.org/', './bindings' ]
97 verbose request after pass 2, where is https://registry.npmjs.org/bindings
98 verbose request no auth needed
99 info attempt registry request try #1 at 12:04:27
100 verbose etag "6SJRISMK25A1UDWM33HHCDB3Q"
101 http request GET https://registry.npmjs.org/bindings
102 verbose request on initialization, where is /nan
103 verbose request after pass 1, where is /nan
104 verbose request url raw /nan
105 verbose request resolving registry [ 'https://registry.npmjs.org/', './nan' ]
106 verbose request after pass 2, where is https://registry.npmjs.org/nan
107 verbose request no auth needed
108 info attempt registry request try #1 at 12:04:27
109 verbose etag "BASL4AHUZL2X9BYWJN23MGK84"
110 http request GET https://registry.npmjs.org/nan
111 http 304 https://registry.npmjs.org/bindings
112 silly registry.get cb [ 304,
112 silly registry.get   { date: 'Fri, 12 Dec 2014 10:04:28 GMT',
112 silly registry.get     server: 'Apache',
112 silly registry.get     via: '1.1 varnish',
112 silly registry.get     'last-modified': 'Fri, 12 Dec 2014 10:04:28 GMT',
112 silly registry.get     'cache-control': 'max-age=60',
112 silly registry.get     etag: '"6SJRISMK25A1UDWM33HHCDB3Q"',
112 silly registry.get     age: '0',
112 silly registry.get     'x-served-by': 'cache-ams4121-AMS',
112 silly registry.get     'x-cache': 'HIT',
112 silly registry.get     'x-cache-hits': '1',
112 silly registry.get     'x-timer': 'S1418378668.283457,VS0,VE89',
112 silly registry.get     vary: 'Accept',
112 silly registry.get     'content-length': '0',
112 silly registry.get     'keep-alive': 'timeout=10, max=50',
112 silly registry.get     connection: 'Keep-Alive' } ]
113 verbose etag https://registry.npmjs.org/bindings from cache
114 silly addNameRange number 2 { name: 'bindings', range: '*', hasData: true }
115 silly addNameRange versions [ 'bindings',
115 silly addNameRange   [ '0.0.1',
115 silly addNameRange     '0.1.0',
115 silly addNameRange     '0.1.1',
115 silly addNameRange     '0.2.0',
115 silly addNameRange     '0.2.1',
115 silly addNameRange     '0.2.2',
115 silly addNameRange     '0.2.3',
115 silly addNameRange     '0.2.4',
115 silly addNameRange     '0.3.0',
115 silly addNameRange     '0.4.0',
115 silly addNameRange     '1.0.0',
115 silly addNameRange     '1.1.0',
115 silly addNameRange     '1.1.1',
115 silly addNameRange     '1.2.0',
115 silly addNameRange     '1.2.1' ] ]
116 verbose addNamed [email protected]
117 silly addNamed semver.valid 1.2.1
118 silly addNamed semver.validRange 1.2.1
119 http 304 https://registry.npmjs.org/nan
120 silly registry.get cb [ 304,
120 silly registry.get   { date: 'Fri, 12 Dec 2014 10:04:28 GMT',
120 silly registry.get     server: 'Apache',
120 silly registry.get     via: '1.1 varnish',
120 silly registry.get     'last-modified': 'Fri, 12 Dec 2014 10:04:28 GMT',
120 silly registry.get     'cache-control': 'max-age=60',
120 silly registry.get     etag: '"BASL4AHUZL2X9BYWJN23MGK84"',
120 silly registry.get     age: '0',
120 silly registry.get     'x-served-by': 'cache-ams4123-AMS',
120 silly registry.get     'x-cache': 'HIT',
120 silly registry.get     'x-cache-hits': '1',
120 silly registry.get     'x-timer': 'S1418378668.271183,VS0,VE165',
120 silly registry.get     vary: 'Accept',
120 silly registry.get     'content-length': '0',
120 silly registry.get     'keep-alive': 'timeout=10, max=50',
120 silly registry.get     connection: 'Keep-Alive' } ]
121 verbose etag https://registry.npmjs.org/nan from cache
122 silly addNameRange number 2 { name: 'nan', range: '>=1.2.0 <1.3.0', hasData: true }
123 silly addNameRange versions [ 'nan',
123 silly addNameRange   [ '0.3.0-wip',
123 silly addNameRange     '0.3.0-wip2',
123 silly addNameRange     '0.3.0',
123 silly addNameRange     '0.3.1',
123 silly addNameRange     '0.3.2',
123 silly addNameRange     '0.4.0',
123 silly addNameRange     '0.4.1',
123 silly addNameRange     '0.4.2',
123 silly addNameRange     '0.4.3',
123 silly addNameRange     '0.4.4',
123 silly addNameRange     '0.5.0',
123 silly addNameRange     '0.5.1',
123 silly addNameRange     '0.5.2',
123 silly addNameRange     '0.6.0',
123 silly addNameRange     '0.7.0',
123 silly addNameRange     '0.7.1',
123 silly addNameRange     '0.8.0',
123 silly addNameRange     '1.0.0',
123 silly addNameRange     '1.1.0',
123 silly addNameRange     '1.1.1',
123 silly addNameRange     '1.1.2',
123 silly addNameRange     '1.2.0',
123 silly addNameRange     '1.3.0',
123 silly addNameRange     '1.4.0',
123 silly addNameRange     '1.4.1' ] ]
124 verbose addNamed [email protected]
125 silly addNamed semver.valid 1.2.0
126 silly addNamed semver.validRange 1.2.0
127 silly install resolved [ { name: 'bindings',
127 silly install resolved     description: 'Helper module for loading your native module\'s .node file',
127 silly install resolved     keywords: [ 'native', 'addon', 'bindings', 'gyp', 'waf', 'c', 'c++' ],
127 silly install resolved     version: '1.2.1',
127 silly install resolved     author:
127 silly install resolved      { name: 'Nathan Rajlich',
127 silly install resolved        email: '[email protected]',
127 silly install resolved        url: 'http://tootallnate.net' },
127 silly install resolved     repository:
127 silly install resolved      { type: 'git',
127 silly install resolved        url: 'git://github.com/TooTallNate/node-bindings.git' },
127 silly install resolved     main: './bindings.js',
127 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-bindings/issues' },
127 silly install resolved     homepage: 'https://github.com/TooTallNate/node-bindings',
127 silly install resolved     license: 'MIT',
127 silly install resolved     gitHead: 'e404152ee27f8478ccbc7122ee051246e8e5ec02',
127 silly install resolved     _id: '[email protected]',
127 silly install resolved     scripts: {},
127 silly install resolved     _shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
127 silly install resolved     _from: 'bindings@*',
127 silly install resolved     _npmVersion: '1.4.14',
127 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
127 silly install resolved     maintainers: [ [Object], [Object] ],
127 silly install resolved     dist:
127 silly install resolved      { shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
127 silly install resolved        tarball: 'http://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz' },
127 silly install resolved     directories: {},
127 silly install resolved     _resolved: 'https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz',
127 silly install resolved     readme: 'ERROR: No README data found!' },
127 silly install resolved   { name: 'nan',
127 silly install resolved     version: '1.2.0',
127 silly install resolved     description: 'Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility',
127 silly install resolved     main: 'include_dirs.js',
127 silly install resolved     repository: { type: 'git', url: 'git://github.com/rvagg/nan.git' },
127 silly install resolved     contributors: [ [Object], [Object], [Object], [Object], [Object], [Object] ],
127 silly install resolved     license: 'MIT',
127 silly install resolved     bugs: { url: 'https://github.com/rvagg/nan/issues' },
127 silly install resolved     homepage: 'https://github.com/rvagg/nan',
127 silly install resolved     _id: '[email protected]',
127 silly install resolved     dist:
127 silly install resolved      { shasum: '9c4d63ce9e4f8e95de2d574e18f7925554a8a8ef',
127 silly install resolved        tarball: 'http://registry.npmjs.org/nan/-/nan-1.2.0.tgz' },
127 silly install resolved     _from: 'nan@>=1.2.0 <1.3.0',
127 silly install resolved     _npmVersion: '1.4.3',
127 silly install resolved     _npmUser: { name: 'rvagg', email: '[email protected]' },
127 silly install resolved     maintainers: [ [Object] ],
127 silly install resolved     directories: {},
127 silly install resolved     _shasum: '9c4d63ce9e4f8e95de2d574e18f7925554a8a8ef',
127 silly install resolved     _resolved: 'https://registry.npmjs.org/nan/-/nan-1.2.0.tgz',
127 silly install resolved     readme: 'ERROR: No README data found!' } ]
128 info install [email protected] into /home/ionicabizau/Documents/invoices/node_modules/weak
129 info install [email protected] into /home/ionicabizau/Documents/invoices/node_modules/weak
130 info installOne [email protected]
131 info installOne [email protected]
132 verbose locking bindings with /home/ionicabizau/.npm/_locks/bindings-d36c0e3b2139334a.lock
133 verbose locking nan with /home/ionicabizau/.npm/_locks/nan-242c097250021dc1.lock
134 verbose unbuild node_modules/weak/node_modules/bindings
135 verbose unbuild node_modules/weak/node_modules/nan
136 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/bindings
137 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/nan
138 verbose tar unpack /home/ionicabizau/.npm/bindings/1.2.1/package.tgz
139 verbose tar unpacking to /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/bindings
140 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/bindings
141 verbose tar unpack /home/ionicabizau/.npm/nan/1.2.0/package.tgz
142 verbose tar unpacking to /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/nan
143 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/nan
144 silly gunzTarPerm modes [ '775', '664' ]
145 silly gunzTarPerm modes [ '775', '664' ]
146 silly gunzTarPerm extractEntry package.json
147 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ]
148 silly gunzTarPerm extractEntry package.json
149 silly gunzTarPerm modified mode [ 'package.json', 420, 436 ]
150 silly gunzTarPerm extractEntry README.md
151 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ]
152 silly gunzTarPerm extractEntry bindings.js
153 silly gunzTarPerm modified mode [ 'bindings.js', 420, 436 ]
154 silly gunzTarPerm extractEntry README.md
155 silly gunzTarPerm modified mode [ 'README.md', 420, 436 ]
156 silly gunzTarPerm extractEntry LICENSE
157 silly gunzTarPerm modified mode [ 'LICENSE', 420, 436 ]
158 silly gunzTarPerm extractEntry include_dirs.js
159 silly gunzTarPerm modified mode [ 'include_dirs.js', 420, 436 ]
160 silly gunzTarPerm extractEntry .dntrc
161 silly gunzTarPerm modified mode [ '.dntrc', 420, 436 ]
162 silly gunzTarPerm extractEntry build/config.gypi
163 silly gunzTarPerm modified mode [ 'build/config.gypi', 420, 436 ]
164 silly gunzTarPerm extractEntry nan.h
165 silly gunzTarPerm modified mode [ 'nan.h', 420, 436 ]
166 info preinstall [email protected]
167 silly install resolved []
168 verbose about to build /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/bindings
169 info build /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/bindings
170 verbose linkStuff [ false,
170 verbose linkStuff   false,
170 verbose linkStuff   false,
170 verbose linkStuff   '/home/ionicabizau/Documents/invoices/node_modules/weak/node_modules' ]
171 info linkStuff [email protected]
172 verbose linkBins [email protected]
173 verbose linkMans [email protected]
174 verbose rebuildBundles [email protected]
175 info install [email protected]
176 info postinstall [email protected]
177 verbose unlocking bindings from /home/ionicabizau/.npm/_locks/bindings-d36c0e3b2139334a.lock
178 info preinstall [email protected]
179 silly install resolved []
180 verbose about to build /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/nan
181 info build /home/ionicabizau/Documents/invoices/node_modules/weak/node_modules/nan
182 verbose linkStuff [ false,
182 verbose linkStuff   false,
182 verbose linkStuff   false,
182 verbose linkStuff   '/home/ionicabizau/Documents/invoices/node_modules/weak/node_modules' ]
183 info linkStuff [email protected]
184 verbose linkBins [email protected]
185 verbose linkMans [email protected]
186 verbose rebuildBundles [email protected]
187 info install [email protected]
188 info postinstall [email protected]
189 verbose unlocking nan from /home/ionicabizau/.npm/_locks/nan-242c097250021dc1.lock
190 verbose about to build /home/ionicabizau/Documents/invoices/node_modules/weak
191 info build /home/ionicabizau/Documents/invoices/node_modules/weak
192 verbose linkStuff [ false,
192 verbose linkStuff   false,
192 verbose linkStuff   false,
192 verbose linkStuff   '/home/ionicabizau/Documents/invoices/node_modules' ]
193 info linkStuff [email protected]
194 verbose linkBins [email protected]
195 verbose linkMans [email protected]
196 verbose rebuildBundles [email protected]
197 verbose rebuildBundles [ 'bindings', 'nan' ]
198 info install [email protected]
199 verbose unsafe-perm in lifecycle true
200 info [email protected] Failed to exec install script
201 verbose unlocking weak from /home/ionicabizau/.npm/_locks/weak-340264ce2fa49f33.lock
202 verbose stack Error: [email protected] install: `node-gyp rebuild`
202 verbose stack Exit status 1
202 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
202 verbose stack     at ChildProcess.emit (events.js:98:17)
202 verbose stack     at maybeClose (child_process.js:756:16)
202 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:823:5)
203 verbose pkgid [email protected]
204 verbose cwd /home/ionicabizau/Documents/invoices
205 error Linux 3.16.0-26-lowlatency
206 error argv "node" "/usr/local/bin/npm" "install" "weak"
207 error node v0.10.32
208 error npm  v2.1.2
209 error code ELIFECYCLE
210 error [email protected] install: `node-gyp rebuild`
210 error Exit status 1
211 error Failed at the [email protected] install script.
211 error This is most likely a problem with the weak package,
211 error not with npm itself.
211 error Tell the author that this fails on your system:
211 error     node-gyp rebuild
211 error You can get their info via:
211 error     npm owner ls weak
211 error There is likely additional logging output above.
212 verbose exit [ 1, true ]
213 verbose unbuild node_modules/weak
214 info preuninstall [email protected]
215 info uninstall [email protected]
216 verbose unbuild rmStuff [email protected] from /home/ionicabizau/Documents/invoices/node_modules
217 info postuninstall [email protected]
218 verbose gentlyRm vacuuming /home/ionicabizau/Documents/invoices/node_modules/weak
219 silly gentlyRm purging /home/ionicabizau/Documents/invoices/node_modules/weak
220 silly gentlyRm removing /home/ionicabizau/Documents/invoices/node_modules
221 silly gentlyRm quitting because other entries in /home/ionicabizau/Documents/invoices

Is it possible to add resurrection to this module?

Ideally, this module's references would act something like long-weak references in c#. It would be nice to be able to be able to inspect the variable before its garbage collected, so you can print things that are inside it before it dies. I suspect this isn't possible, for the same reason the readme warns against defining the callback in the same scope as the reference, but maybe?

Build error on [email protected] and [email protected]

> [email protected] install /path/to/project/node_modules/weak
> node-gyp rebuild

make: Entering directory `/srv/www/crm/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
  SOLINK_MODULE(target) Release/obj.target/weakref.node
  COPY Release/weakref.node
cp: preserving permissions for โ€˜Release/weakref.nodeโ€™: Operation not permitted
make: *** [Release/weakref.node] Error 1
make: Leaving directory `/srv/www/crm/node_modules/weak/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.16.0-30-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /path/to/project/node_modules/weak
gyp ERR! node -v v0.12.5
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:weak [email protected] install: `node-gyp rebuild`
npm WARN install:weak Exit status 1

Do you have any clue what's going wrong?

docs wrong: arguments to GC callback function

The API docs for the main entry point, weak, say

Weakref weak(Object obj [, Function callback])
The main exports is the function that creates the weak reference. The first argument is the Object that should be monitored. The Object can be a regular Object, an Array, a Function, a RegExp, or any of the primitive types or constructor function created with new. Optionally, you can set a callback function to be invoked before the object is garbage collected.

but don't document the arguments the callback function is invoked with (this would be a nice place to document them).

The only place I see these arguments documented is in the example

// Here's where we set up the weak reference
var ref = weak(obj, function () {
  // `this` inside the callback is the 'obj'. DO NOT store any new references
  // to the object, and DO NOT use the object in any async functions.
  cleanup(this)
})

which is no longer correct (in v0.3.1, and I presume since 7784f3f); now this is the EventEmitter, and the obj is passed as the first argument to the callback.

assert triggered in v8 debug build when using node-weak module

I see an assertion triggered when running debug version of v8 and trying to get a property
on the weak-reference object via WeakNamedPropertyGetter or WeakIndexedPropertyGetter. I don't have my logs handy but I believe the assertion
was due to failure of:
ASSERT(reinterpret_cast

(*location_) != kHandleZapValue);

Looking at the code, it appears that in these cases, we are failing to return the values through scope.Close().

Install fails with Visual Studio 2012

Doing an 'npm install weak' doesn't appear to work on a system with Visual Studio 2012 (and not 2010) installed. NPM output:

PS C:\Users\justbe\Documents\temp> npm install weak
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install C:\Users\justbe\Documents\temp\node_modules\weak
> node-gyp rebuild


C:\Users\justbe\Documents\temp\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t
argets(35,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build tools, either
click the Project menu or right-click the solution, and then select "Update VC+
+ Projects...". Install Visual Studio 2010 to build using the Visual Studio 201
0 build tools. [C:\Users\justbe\Documents\temp\node_modules\weak\build\weakref.
vcxproj]
gyp ERR! rebuild error Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! rebuild error     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:214:23)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/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 weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak"
npm ERR! cwd C:\Users\justbe\Documents\temp
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\justbe\Documents\temp\npm-debug.log
npm ERR! not ok code 0

io.js 2.0 support.

In package.json, nan module should be updated to ~1.8.0. Or ^1.8.0 or ^1.6.4, if you don't want to update package.json with every required nan version bump.

Build error

Ubuntu 10.04 node 0.10.30. Installation failed with:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/vagrant/.node-gyp/0.10.30"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/weak/.node-gyp"
make: Entering directory `/usr/lib/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
make: g++: Command not found
make: *** [Release/obj.target/weakref/src/weakref.o] Error 127
make: Leaving directory `/usr/lib/node_modules/weak/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 2.6.32-38-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/weak
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.32-38-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "weak"
npm ERR! cwd /vagrant/projects/test
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /vagrant/projects/test/npm-debug.log
npm ERR! not ok code 0

npm instal weak not working on linux mint 17.1

> [email protected] install /home/gadget-girl/App/test/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
> node-gyp rebuild

make: Entering directory `/home/gadget-girl/App/test/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
make: g++: Command not found
make: *** [Release/obj.target/weakref/src/weakref.o] Error 127
make: Leaving directory `/home/gadget-girl/App/test/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak/build'
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:269:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gadget-girl/App/test/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]

is the Error that i am get when try to install weak.

provide a way to test if a reference is weak

Is there a way to test if an object represents a weak reference?

If not, please consider adding one, such as 'Weak.isWeakRef(Object obj)'.

We found it terribly useful when debugging our code where we passed a strong reference when we thought a weak one was passed. It would also be useful for assertions.

As a work-around, we used Weak.isDead which throws a TypeError if what's passed is not a weak ref.

MakeCallback assert-fails in node 0.12

I'm running some preliminary experiments using the weak extension under Node 0.12 (there's no such release yet, but there is a code branch you can build and run, which results in a Node binary claiming to be v0.11.14-pre).

This mostly seems to work fine but I've seen a few sporadic Node process crashes which gdb tells me are at

Core was generated by `/home/magi/node-binaries/nodejs-0.12 --harmony --expose_gc --trace_gc /home/mag'.
Program terminated with signal 6, Aborted.
#0  0x00002ae50b34e4f5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00002ae50b34e4f5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00002ae50b351c5b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00002ae50b3471be in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00002ae50b347262 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000ae09e4 in node::MakeCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) ()
#5  0x0000000000ae1111 in node::MakeCallback(v8::Isolate*, v8::Handle<v8::Object>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) ()
#6  0x00002ae51420fdd8 in void (anonymous namespace)::TargetCallback<v8::Object, (anonymous namespace)::proxy_container>(_NanWeakCallbackData<v8::Object, (anonymous namespace)::proxy_container> const&)
    () from /home/magi/src/node12test/node_modules/weak/build/Release/weakref.node
#7  0x00002ae51420fc98 in void _NanWeakCallbackDispatcher<v8::Object, (anonymous namespace)::proxy_container>(v8::WeakCallbackData<v8::Object, _NanWeakCallbackInfo<v8::Object, (anonymous namespace)::proxy_container> > const&) () from /home/magi/src/node12test/node_modules/weak/build/Release/weakref.node
#8  0x000000000080487f in v8::internal::GlobalHandles::PostGarbageCollectionProcessing(v8::internal::GarbageCollector, v8::internal::GCTracer*) ()
#9  0x000000000082b8d6 in v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GCTracer*, v8::GCCallbackFlags) ()
#10 0x000000000082c0c7 in v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, char const*, char const*, v8::GCCallbackFlags) ()

The assert in the Node codebase has a comment:

  // If you hit this assertion, you forgot to enter the v8::Context first.
  assert(env->context() == env->isolate()->GetCurrentContext());

I'm guessing that's exactly the problem, but I don't know if it's weak's job or nan's job to do that.

Support 0.11.5

When trying to compile my application that uses weak (through dnode) I get the following error

make: Entering directory `/home/raynos/Documents/event-log-server/node_modules/fleet/node_modules/propagit/node_modules/upnode/node_modules/dnode/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
../src/weakref.cc: In function โ€˜v8::Handle<v8::Object> {anonymous}::Unwrap(v8::Handle<v8::Object>)โ€™:
../src/weakref.cc:58:16: error: could not convert โ€˜cont->{anonymous}::proxy_container::targetโ€™ from โ€˜v8::Persistent<v8::Object>โ€™ to โ€˜v8::Handle<v8::Object>โ€™
../src/weakref.cc: In function โ€˜v8::Handle<v8::Array> {anonymous}::GetCallbacks(v8::Handle<v8::Object>)โ€™:
../src/weakref.cc:69:16: error: could not convert โ€˜cont->{anonymous}::proxy_container::callbacksโ€™ from โ€˜v8::Persistent<v8::Array>โ€™ to โ€˜v8::Handle<v8::Array>โ€™
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h: In function โ€˜void {anonymous}::TargetCallback(v8::Persistent<v8::Value>, void*)โ€™:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::Array]โ€™ is private
../src/weakref.cc:158:33: error: within this context
../src/weakref.cc:160:13: error: no match for โ€˜operator=โ€™ in โ€˜argv[0] = targetโ€™
../src/weakref.cc:160:13: note: candidate is:
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:249:26: note: v8::Handle<v8::Value>& v8::Handle<v8::Value>::operator=(const v8::Handle<v8::Value>&)
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:249:26: note:   no known conversion for argument 1 from โ€˜v8::Persistent<v8::Value>โ€™ to โ€˜const v8::Handle<v8::Value>&โ€™
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::Array]โ€™ is private
../src/weakref.cc:164:24: error: within this context
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::Value]โ€™ is private
../src/weakref.cc:168:20: error: within this context
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::Object]โ€™ is private
../src/weakref.cc:176:14: error: within this context
../src/weakref.cc: In function โ€˜v8::Handle<v8::Value> {anonymous}::Create(const v8::Arguments&)โ€™:
../src/weakref.cc:201:61: error: no matching function for call to โ€˜v8::Persistent<v8::Object>::New(v8::Local<v8::Object>)โ€™
../src/weakref.cc:201:61: note: candidate is:
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Object]
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note:   candidate expects 2 arguments, 1 provided
../src/weakref.cc:202:56: error: no matching function for call to โ€˜v8::Persistent<v8::Array>::New(v8::Local<v8::Array>)โ€™
../src/weakref.cc:202:56: note: candidate is:
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Array]
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note:   candidate expects 2 arguments, 1 provided
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]โ€™ is private
../src/weakref.cc:204:51: error: within this context
../src/weakref.cc:204:66: error: no matching function for call to โ€˜v8::Persistent<v8::Object>::New(v8::Local<v8::Object>)โ€™
../src/weakref.cc:204:66: note: candidate is:
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Object]
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note:   candidate expects 2 arguments, 1 provided
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::Object]โ€™ is private
../src/weakref.cc:206:14: error: within this context
../src/weakref.cc:211:45: error: invalid conversion from โ€˜void (*)(v8::Persistent<v8::Value>, void*)โ€™ to โ€˜v8::WeakReferenceCallbacks<v8::Object, {anonymous}::proxy_container>::Revivable {aka void (*)(v8::Isolate*, v8::Persistent<v8::Object>*, {anonymous}::proxy_container*)}โ€™ [-fpermissive]
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5682:6: error:   initializing argument 2 of โ€˜void v8::Persistent<T>::MakeWeak(P*, typename v8::WeakReferenceCallbacks<T, P>::Revivable) [with P = {anonymous}::proxy_container; T = v8::Object; typename v8::WeakReferenceCallbacks<T, P>::Revivable = void (*)(v8::Isolate*, v8::Persistent<v8::Object>*, {anonymous}::proxy_container*)]โ€™ [-fpermissive]
../src/weakref.cc:214:61: error: could not convert โ€˜cont->{anonymous}::proxy_container::proxyโ€™ from โ€˜v8::Persistent<v8::Object>โ€™ to โ€˜v8::Handle<v8::Object>โ€™
../src/weakref.cc:217:16: error: could not convert โ€˜cont->{anonymous}::proxy_container::proxyโ€™ from โ€˜v8::Persistent<v8::Object>โ€™ to โ€˜v8::Handle<v8::Value>โ€™
../src/weakref.cc: In function โ€˜void {anonymous}::Initialize(v8::Handle<v8::Object>)โ€™:
../src/weakref.cc:315:69: error: no matching function for call to โ€˜v8::Persistent<v8::ObjectTemplate>::New(v8::Local<v8::ObjectTemplate>)โ€™
../src/weakref.cc:315:69: note: candidate is:
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate]
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:5621:4: note:   candidate expects 2 arguments, 1 provided
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]โ€™ is private
../src/weakref.cc:316:13: error: within this context
../src/weakref.cc:320:61: warning: โ€˜void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetter, v8::NamedPropertySetter, v8::NamedPropertyQuery, v8::NamedPropertyDeleter, v8::NamedPropertyEnumerator, v8::Handle<v8::Value>)โ€™ is deprecated (declared at /home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:3460) [-Wdeprecated-declarations]
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]โ€™ is private
../src/weakref.cc:321:13: error: within this context
../src/weakref.cc:325:63: warning: โ€˜void v8::ObjectTemplate::SetIndexedPropertyHandler(v8::IndexedPropertyGetter, v8::IndexedPropertySetter, v8::IndexedPropertyQuery, v8::IndexedPropertyDeleter, v8::IndexedPropertyEnumerator, v8::Handle<v8::Value>)โ€™ is deprecated (declared at /home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:3491) [-Wdeprecated-declarations]
In file included from ../src/weakref.cc:18:0:
/home/raynos/.node-gyp/0.11.5/deps/v8/include/v8.h:771:3: error: โ€˜T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]โ€™ is private
../src/weakref.cc:326:13: error: within this context
../src/weakref.cc:328:37: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [4], v8::Handle<v8::Value> (&)(const v8::Arguments&))โ€™
../src/weakref.cc:328:37: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:328:37: note:   cannot convert โ€˜{anonymous}::Getโ€™ (type โ€˜v8::Handle<v8::Value>(const v8::Arguments&)โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:329:43: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [7], v8::Handle<v8::Value> (&)(const v8::Arguments&))โ€™
../src/weakref.cc:329:43: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:329:43: note:   cannot convert โ€˜{anonymous}::Createโ€™ (type โ€˜v8::Handle<v8::Value>(const v8::Arguments&)โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:330:49: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [10], v8::Handle<v8::Value> (&)(const v8::Arguments&))โ€™
../src/weakref.cc:330:49: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:330:49: note:   cannot convert โ€˜{anonymous}::IsWeakRefโ€™ (type โ€˜v8::Handle<v8::Value>(const v8::Arguments&)โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:331:53: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [12], v8::Handle<v8::Value> (&)(const v8::Arguments&))โ€™
../src/weakref.cc:331:53: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:331:53: note:   cannot convert โ€˜{anonymous}::IsNearDeathโ€™ (type โ€˜v8::Handle<v8::Value>(const v8::Arguments&)โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:332:43: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [7], <unresolved overloaded function type>)โ€™
../src/weakref.cc:332:43: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:332:43: note:   cannot convert โ€˜{anonymous}::IsDeadโ€™ (type โ€˜<unresolved overloaded function type>โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:333:49: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [10], v8::Handle<v8::Value> (&)(const v8::Arguments&))โ€™
../src/weakref.cc:333:49: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:333:49: note:   cannot convert โ€˜{anonymous}::Callbacksโ€™ (type โ€˜v8::Handle<v8::Value>(const v8::Arguments&)โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc:334:53: error: no matching function for call to โ€˜NODE_SET_METHOD(v8::Handle<v8::Object>&, const char [12], <unresolved overloaded function type>)โ€™
../src/weakref.cc:334:53: note: candidate is:
In file included from ../src/weakref.cc:19:0:
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note: template<class TypeName> void node::NODE_SET_METHOD(const TypeName&, const char*, v8::FunctionCallback)
/home/raynos/.node-gyp/0.11.5/src/node.h:140:13: note:   template argument deduction/substitution failed:
../src/weakref.cc:334:53: note:   cannot convert โ€˜{anonymous}::AddCallbackโ€™ (type โ€˜<unresolved overloaded function type>โ€™) to type โ€˜v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfo<v8::Value>&)}โ€™
../src/weakref.cc: In function โ€˜v8::Handle<v8::Object> {anonymous}::Unwrap(v8::Handle<v8::Object>)โ€™:
../src/weakref.cc:59:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [Release/obj.target/weakref/src/weakref.o] Error 1
make: Leaving directory `/home/raynos/Documents/event-log-server/node_modules/fleet/node_modules/propagit/node_modules/upnode/node_modules/dnode/node_modules/weak/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/raynos/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 Linux 3.8.0-27-generic
gyp ERR! command "node" "/home/raynos/nvm/v0.11.5/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/raynos/Documents/event-log-server/node_modules/fleet/node_modules/propagit/node_modules/upnode/node_modules/dnode/node_modules/weak
gyp ERR! node -v v0.11.5
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok 
npm ERR! weird error 1
npm ERR! not ok code 0

Consider using nan for compat with 0.11, 0.10 & 0.8

String.prototype.valueOf is not generic

If you're making weak references to String objects then it can no longer behave like a string:

var string = weak(new String('test'));
string == 'test'; //throws String.prototype.valueOf is not generic

Is this a known limitation?

sh "-c" "node-gyp rebuild"` failed with 1

Hi,

In my way to use Tower I hit a big fat Rock, and it don't seem to be a Tower issue, in myProject folder :

$ npm install

[โ€ฆ] #plenty of "irrelevant thingies" here

ERR! Error: EXDEV, link '/usr/lib/nodejs/node-gyp/legacy/tools/gyp/pylib/gyp/system_test.pyc'
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 weak 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 weak
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 3.3.2-6.fc16.x86_64
npm ERR! command "nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/kanethornwyrd/projects/myProject
npm ERR! node -v v0.6.15
npm ERR! npm -v 1.1.18
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: \`node-gyp rebuild\`
npm ERR! message \`sh "-c" "node-gyp rebuild"\` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/kanethornwyrd/projects/myProject/npm-debug.log
npm not ok`

So, then, as asked, I simply:
`$ sudo node-gyp rebuild
info it worked if it ends with ok 
spawn python [ '/root/.node-gyp/0.6.15/tools/gyp_addon',
  'binding.gyp',
  '-I/home/jean-cedric/projects/cinexus/build/config.gypi',
  '-f',
  'make' ]
Traceback (most recent call last):
  File "/root/.node-gyp/0.6.15/tools/gyp_addon", line 38, in <module>
    rc = gyp.main(gyp_args)
  File "/root/.node-gyp/0.6.15/tools/gyp/pylib/gyp/__init__.py", line 471, in main
    options.circular_check)
  File "/root/.node-gyp/0.6.15/tools/gyp/pylib/gyp/__init__.py", line 111, in Load
    depth, generator_input_info, check, circular_check)
  File "/root/.node-gyp/0.6.15/tools/gyp/pylib/gyp/input.py", line 2289, in Load
    depth, check)
  File "/root/.node-gyp/0.6.15/tools/gyp/pylib/gyp/input.py", line 361, in LoadTargetBuildFile
    includes, True, check)
  File "/root/.node-gyp/0.6.15/tools/gyp/pylib/gyp/input.py", line 208, in LoadOneBuildFile
    raise Exception("%s not found (cwd: %s)" % (build_file_path, os.getcwd()))
Exception: binding.gyp not found (cwd: /home/kanethorn/projects/cinexus) while trying to load binding.gyp
ERR! Error: `gyp_addon` failed with exit code: 1
    at ChildProcess.onCpExit (/usr/lib/nodejs/node-gyp/lib/configure.js:226:16)
    at ChildProcess.emit (events.js:70:17)
    at maybeExit (child_process.js:360:16)
    at Process.onexit (child_process.js:396:5)
ERR! not ok

Sorry MD failโ€ฆ ยฌยฌ

npm install dnode fail with node0.8.7 & win7

Env


win7
>python --version
Python 2.7.3
>npm -v
1.1.49
>node -v
v0.8.7
>more C:\Progra~1\nodejs\node_modules\npm\node_mo
dules\node-gyp\package.json
{
  "name": "node-gyp",
...
...
  "version": "0.6.8",
  "installVersion": 9,

error when npm install dnode :


> [email protected] install E:\Workspace\TZ\LTE-Test\client\node_modules\dnode\node_mod
ules\weak
> node-gyp rebuild


E:\Workspace\TZ\LTE-Test\client\node_modules\dnode\node_modules\weak>node "C:\Pr
ogram Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gy
p\bin\node-gyp.js" rebuild
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'weakref.vcxproj' is in
valid.  Platform='x64'. You may be seeing this message because you are trying t
o build a project without a solution file, and have specified a non-default Pla
tform that doesn't exist for this project. [E:\Workspace\TZ\LTE-Test\client\nod
e_modules\dnode\node_modules\weak\build\weakref.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:219:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
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 E:\Workspace\TZ\LTE-Test\client\node_modules\dnode\node_modules\wea
k
gyp ERR! node -v v0.8.7
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
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "dnode"
npm ERR! cwd E:\Workspace\TZ\LTE-Test\client
npm ERR! node -v v0.8.7
npm ERR! npm -v 1.1.49
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     E:\Workspace\TZ\LTE-Test\client\npm-debug.log
npm ERR! not ok code 0

Tests fail with 'cannot restore segment prot after reloc: Permission denied'

After cloning and npm install I try to do the test but I get the following error:

/home/sander/Development/node-weak/node_modules/bindings/bindings.js:79
        throw e
              ^
Error: /home/sander/Development/node-weak/build/Release/weakref.node: cannot restore segment prot after reloc: Permission denied

Don't know what is wrong here, it works on other Linux Systems... Do you know what I do wrong ??
BTW full transcript below + version printouts.

Thanks!!

Sander

[sander@development Development]$ git clone git://github.com/TooTallNate/node-weak.git
Cloning into node-weak...
remote: Counting objects: 386, done.
remote: Compressing objects: 100% (180/180), done.
remote: Total 386 (delta 195), reused 351 (delta 160)
Receiving objects: 100% (386/386), 65.41 KiB, done.
Resolving deltas: 100% (195/195), done.
[sander@development Development]$ cd node-weak
[sander@development node-weak]$ npm install
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/should
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/should
npm http 304 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0

> [email protected] install /home/sander/Development/node-weak
> node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
make: Entering directory `/home/sander/Development/node-weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
  SOLINK_MODULE(target) Release/obj.target/weakref.node
  SOLINK_MODULE(target) Release/obj.target/weakref.node: Finished
  COPY Release/weakref.node
make: Leaving directory `/home/sander/Development/node-weak/build'
[email protected] node_modules/bindings

[email protected] node_modules/should

[email protected] node_modules/mocha
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ”œโ”€โ”€ [email protected]
โ””โ”€โ”€ [email protected] ([email protected])

[sander@development node-weak]$ npm test

> [email protected] test /home/sander/Development/node-weak
> mocha -gc --reporter spec


/home/sander/Development/node-weak/node_modules/bindings/bindings.js:79
        throw e
              ^
Error: /home/sander/Development/node-weak/build/Release/weakref.node: cannot restore segment prot after reloc: Permission denied
    at Object.Module._extensions..node (module.js:485:11)
    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 bindings (/home/sander/Development/node-weak/node_modules/bindings/bindings.js:74:15)
    at Object.<anonymous> (/home/sander/Development/node-weak/lib/weak.js:1:97)
    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.<anonymous> (/home/sander/Development/node-weak/test/buffer.js:2:12)
    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 Mocha.loadFiles (/home/sander/Development/node-weak/node_modules/mocha/lib/mocha.js:135:27)
    at Array.forEach (native)
    at Mocha.loadFiles (/home/sander/Development/node-weak/node_modules/mocha/lib/mocha.js:132:14)
    at Mocha.run (/home/sander/Development/node-weak/node_modules/mocha/lib/mocha.js:251:8)
    at Object.<anonymous> (/home/sander/Development/node-weak/node_modules/mocha/bin/_mocha:324:7)
    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.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0
[sander@development node-weak]$ node -v
v0.8.7
[sander@development node-weak]$ npm -v
1.1.49
[sander@development node-weak]$ uname -a
Linux development 2.6.33.3-85.fc13.i686 #1 SMP Thu May 6 18:44:12 UTC 2010 i686 i686 i386 GNU/Linux

weak module install fails on windows 7

Hi I am trying to install node weak module on windows 7
I have setup all the files required for node-gyp from the link below
https://github.com/TooTallNate/node-gyp

I have nodeJS 64 bit v0.10.0. When I try to install weak module I get the below error

weakref.obj : error LNK2001: unresolved external symbol "__declspec(dllimport)
class v8::Handle<class v8::Value> __cdecl node::MakeCallback(class v8::Handle<c
lass v8::Object>,class v8::Handle<class v8::Function>,int,class v8::Handle<clas
s v8::Value> * const)" (__imp_?MakeCallback@node@@YA?AV?$Handle@VValue@v8@@@v8@
@V?$Handle@VObject@v8@@@3@V?$Handle@VFunction@v8@@@3@HQEAV23@@Z) [D:\node_modul
es\weak\build\weakref.vcxproj]
D:\node_modules\weak\build\Release\weakref.node : fatal error LNK1120: 1 unreso
lved externals [D:\node_modules\weak\build\weakref.vcxproj]

After updating to node v0.10.24 I m now getting the below error

LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [D:\node_modu
les\weak\build\weakref.vcxproj]

I'm not sure what is the issue. Can anyone look into this please:

Failed to install on ARM platform

Hi,

I got gyp_main.py: error: no such option: --no-parallel while attempting to install on a ARM platform. It's a beaglebone black. However, it works on another ARM platform (ts-4800)

Node version v0.10.33, compiled on the platform itself without snapshot since it's buggy on ARM.

I tried to match npm version to [email protected] and [email protected] like the working platform.

I used npm explore npm -g -- npm install [email protected] to change npm's internal node-gyp.

Any ideas?

Thanks

# npm install weak
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info trying registry request attempt 1 at 19:41:06
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm info install [email protected] into /var/repo/test
npm info installOne [email protected]
npm info preinstall [email protected]
npm info trying registry request attempt 1 at 19:41:07
npm http GET https://registry.npmjs.org/bindings
npm info trying registry request attempt 1 at 19:41:08
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm info install [email protected] into /var/repo/test/node_modules/weak
npm info install [email protected] into /var/repo/test/node_modules/weak
npm info installOne [email protected]
npm info installOne [email protected]
npm info preinstall [email protected]
npm info build /var/repo/test/node_modules/weak/node_modules/bindings
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info build /var/repo/test/node_modules/weak/node_modules/nan
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /var/repo/test/node_modules/weak
npm info linkStuff [email protected]
npm info install [email protected]

> [email protected] install /var/repo/test/node_modules/weak
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/repo/test/node_modules/weak/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/0.10.33/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/0.10.33',
gyp info spawn args   '-Dmodule_root_dir=/var/repo/test/node_modules/weak',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/repo/test/node_modules/weak
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm info [email protected] Failed to exec install script
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.13-bone70
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "weak"
npm ERR! cwd /var/repo/test
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]
npm ERR! not ok code 0

After my attempt to match versions to my working platform.

# npm install weak
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 20:12:39
npm http request GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm info install [email protected] into /var/repo/test
npm info installOne [email protected]
npm info preinstall [email protected]
npm info attempt registry request try #1 at 20:12:41
npm http request GET https://registry.npmjs.org/nan
npm info attempt registry request try #1 at 20:12:41
npm http request GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/bindings
npm info install [email protected] into /var/repo/test/node_modules/weak
npm info install [email protected] into /var/repo/test/node_modules/weak
npm info installOne [email protected]
npm info installOne [email protected]
npm info preinstall [email protected]
npm info build /var/repo/test/node_modules/weak/node_modules/bindings
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info preinstall [email protected]
npm info build /var/repo/test/node_modules/weak/node_modules/nan
npm info linkStuff [email protected]
npm info install [email protected]
npm info postinstall [email protected]
npm info build /var/repo/test/node_modules/weak
npm info linkStuff [email protected]
npm info install [email protected]

> [email protected] install /var/repo/test/node_modules/weak
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/repo/test/node_modules/weak/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/0.10.33/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/0.10.33',
gyp info spawn args   '-Dmodule_root_dir=/var/repo/test/node_modules/weak',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Linux 3.8.13-bone70
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/repo/test/node_modules/weak
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm info [email protected] Failed to exec install script
npm ERR! Linux 3.8.13-bone70
npm ERR! argv "node" "/usr/local/bin/npm" "install" "weak"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.11
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.
npm info preuninstall [email protected]
npm info uninstall [email protected]
npm info postuninstall [email protected]

npm ERR! Please include the following file with any support request:
npm ERR!     /var/repo/test/npm-debug.log

And the npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'weak' ]
2 info using [email protected]
3 info using [email protected]
4 silly cache add args [ 'weak', null ]
5 verbose cache add spec weak
6 silly cache add parsed spec { raw: 'weak',
6 silly cache add   scope: null,
6 silly cache add   name: 'weak',
6 silly cache add   rawSpec: '',
6 silly cache add   spec: '*',
6 silly cache add   type: 'range' }
7 verbose addNamed weak@*
8 silly addNamed semver.valid null
9 silly addNamed semver.validRange *
10 silly addNameRange { name: 'weak', range: '*', hasData: false }
11 silly mapToRegistry name weak
12 silly mapToRegistry using default registry
13 silly mapToRegistry registry https://registry.npmjs.org/
14 silly mapToRegistry uri https://registry.npmjs.org/weak
15 verbose addNameRange registry:https://registry.npmjs.org/weak not in flight; fetching
16 verbose request uri https://registry.npmjs.org/weak
17 verbose request no auth needed
18 info attempt registry request try #1 at 20:12:39
19 verbose request id b4ebe73a46f83278
20 verbose etag "BMSRXJWFP6M4EA16LS7BP4N25"
21 http request GET https://registry.npmjs.org/weak
22 http 304 https://registry.npmjs.org/weak
23 silly get cb [ 304,
23 silly get   { date: 'Tue, 11 Aug 2015 20:12:39 GMT',
23 silly get     via: '1.1 varnish',
23 silly get     'cache-control': 'max-age=60',
23 silly get     etag: '"BMSRXJWFP6M4EA16LS7BP4N25"',
23 silly get     age: '0',
23 silly get     connection: 'keep-alive',
23 silly get     'x-served-by': 'cache-atl6231-ATL',
23 silly get     'x-cache': 'HIT',
23 silly get     'x-cache-hits': '1',
23 silly get     'x-timer': 'S1439323959.680492,VS0,VE29',
23 silly get     vary: 'Accept' } ]
24 verbose etag https://registry.npmjs.org/weak from cache
25 silly addNameRange number 2 { name: 'weak', range: '*', hasData: true }
26 silly addNameRange versions [ 'weak',
26 silly addNameRange   [ '0.0.1',
26 silly addNameRange     '0.1.0',
26 silly addNameRange     '0.1.1',
26 silly addNameRange     '0.1.2',
26 silly addNameRange     '0.1.3',
26 silly addNameRange     '0.1.4',
26 silly addNameRange     '0.1.5',
26 silly addNameRange     '0.2.0',
26 silly addNameRange     '0.2.1',
26 silly addNameRange     '0.2.2',
26 silly addNameRange     '0.3.0',
26 silly addNameRange     '0.3.1',
26 silly addNameRange     '0.3.2',
26 silly addNameRange     '0.3.3',
26 silly addNameRange     '0.3.4',
26 silly addNameRange     '0.4.0',
26 silly addNameRange     '0.4.1' ] ]
27 verbose addNamed [email protected]
28 silly addNamed semver.valid 0.4.1
29 silly addNamed semver.validRange 0.4.1
30 silly cache afterAdd [email protected]
31 verbose afterAdd /root/.npm/weak/0.4.1/package/package.json not in flight; writing
32 verbose afterAdd /root/.npm/weak/0.4.1/package/package.json written
33 silly install resolved [ { author: { name: 'Ben Noordhuis', email: '[email protected]' },
33 silly install resolved     contributors: [ [Object] ],
33 silly install resolved     name: 'weak',
33 silly install resolved     description: 'Make weak references to JavaScript Objects.',
33 silly install resolved     keywords:
33 silly install resolved      [ 'weak',
33 silly install resolved        'reference',
33 silly install resolved        'js',
33 silly install resolved        'javascript',
33 silly install resolved        'object',
33 silly install resolved        'function',
33 silly install resolved        'callback' ],
33 silly install resolved     version: '0.4.1',
33 silly install resolved     repository:
33 silly install resolved      { type: 'git',
33 silly install resolved        url: 'git://github.com/TooTallNate/node-weak.git' },
33 silly install resolved     main: 'lib/weak.js',
33 silly install resolved     scripts:
33 silly install resolved      { test: 'mocha -gc --reporter spec',
33 silly install resolved        install: 'node-gyp rebuild' },
33 silly install resolved     dependencies: { bindings: '*', nan: '~1.8.4' },
33 silly install resolved     devDependencies: { mocha: '~2.1.0' },
33 silly install resolved     gypfile: true,
33 silly install resolved     gitHead: '928a49389e0396c398de8e9d7e5adfadba4d6b58',
33 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-weak/issues' },
33 silly install resolved     homepage: 'https://github.com/TooTallNate/node-weak',
33 silly install resolved     _id: '[email protected]',
33 silly install resolved     _shasum: '5b7b4fa56790c1d5f2b9453d09e9209ff6d1bcbe',
33 silly install resolved     _from: 'weak@*',
33 silly install resolved     _npmVersion: '2.7.4',
33 silly install resolved     _nodeVersion: '0.12.2',
33 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
33 silly install resolved     maintainers: [ [Object], [Object] ],
33 silly install resolved     dist:
33 silly install resolved      { shasum: '5b7b4fa56790c1d5f2b9453d09e9209ff6d1bcbe',
33 silly install resolved        tarball: 'http://registry.npmjs.org/weak/-/weak-0.4.1.tgz' },
33 silly install resolved     directories: {},
33 silly install resolved     _resolved: 'https://registry.npmjs.org/weak/-/weak-0.4.1.tgz',
33 silly install resolved     readme: 'ERROR: No README data found!' } ]
34 info install [email protected] into /var/repo/test
35 info installOne [email protected]
36 verbose installOne of weak to /var/repo/test not in flight; installing
37 verbose lock using /root/.npm/_locks/weak-3d3666efd27349a0.lock for /var/repo/test/node_modules/weak
38 silly install write writing weak 0.4.1 to /var/repo/test/node_modules/weak
39 silly cache addNamed cb [email protected]
40 verbose unbuild node_modules/weak
41 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak
42 verbose tar unpack /root/.npm/weak/0.4.1/package.tgz
43 verbose tar unpacking to /var/repo/test/node_modules/weak
44 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak
45 silly gunzTarPerm modes [ '755', '644' ]
46 silly gunzTarPerm extractEntry package.json
47 silly gunzTarPerm extractEntry .npmignore
48 silly gunzTarPerm extractEntry README.md
49 silly gunzTarPerm extractEntry LICENSE
50 silly gunzTarPerm extractEntry binding.gyp
51 silly gunzTarPerm extractEntry .travis.yml
52 silly gunzTarPerm extractEntry appveyor.yml
53 silly gunzTarPerm extractEntry History.md
54 silly gunzTarPerm extractEntry lib/weak.js
55 silly gunzTarPerm extractEntry src/weakref.cc
56 silly gunzTarPerm extractEntry test/buffer.js
57 silly gunzTarPerm extractEntry test/callback.js
58 silly gunzTarPerm extractEntry test/create.js
59 silly gunzTarPerm extractEntry test/exports.js
60 silly gunzTarPerm extractEntry test/weakref.js
61 info preinstall [email protected]
62 silly prepareForInstallMany adding bindings@* from weak dependencies
63 silly prepareForInstallMany adding nan@~1.8.4 from weak dependencies
64 silly cache add args [ 'nan@~1.8.4', null ]
65 verbose cache add spec nan@~1.8.4
66 silly cache add parsed spec { raw: 'nan@~1.8.4',
66 silly cache add   scope: null,
66 silly cache add   name: 'nan',
66 silly cache add   rawSpec: '~1.8.4',
66 silly cache add   spec: '>=1.8.4 <1.9.0',
66 silly cache add   type: 'range' }
67 verbose addNamed nan@>=1.8.4 <1.9.0
68 silly addNamed semver.valid null
69 silly addNamed semver.validRange >=1.8.4 <1.9.0
70 silly addNameRange { name: 'nan', range: '>=1.8.4 <1.9.0', hasData: false }
71 silly mapToRegistry name nan
72 silly mapToRegistry using default registry
73 silly mapToRegistry registry https://registry.npmjs.org/
74 silly mapToRegistry uri https://registry.npmjs.org/nan
75 verbose addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
76 silly cache add args [ 'bindings@*', null ]
77 verbose cache add spec bindings@*
78 silly cache add parsed spec { raw: 'bindings@*',
78 silly cache add   scope: null,
78 silly cache add   name: 'bindings',
78 silly cache add   rawSpec: '*',
78 silly cache add   spec: '*',
78 silly cache add   type: 'range' }
79 verbose addNamed bindings@*
80 silly addNamed semver.valid null
81 silly addNamed semver.validRange *
82 silly addNameRange { name: 'bindings', range: '*', hasData: false }
83 silly mapToRegistry name bindings
84 silly mapToRegistry using default registry
85 silly mapToRegistry registry https://registry.npmjs.org/
86 silly mapToRegistry uri https://registry.npmjs.org/bindings
87 verbose addNameRange registry:https://registry.npmjs.org/bindings not in flight; fetching
88 verbose request uri https://registry.npmjs.org/nan
89 verbose request no auth needed
90 info attempt registry request try #1 at 20:12:41
91 verbose etag "41PIK59ZUA3ADEJCQ281I0TDQ"
92 http request GET https://registry.npmjs.org/nan
93 verbose request uri https://registry.npmjs.org/bindings
94 verbose request no auth needed
95 info attempt registry request try #1 at 20:12:41
96 verbose etag "BCS5XYG9ISNJFNKEL5FLOI5HX"
97 http request GET https://registry.npmjs.org/bindings
98 http 304 https://registry.npmjs.org/nan
99 silly get cb [ 304,
99 silly get   { date: 'Tue, 11 Aug 2015 20:12:41 GMT',
99 silly get     via: '1.1 varnish',
99 silly get     'cache-control': 'max-age=60',
99 silly get     etag: '"41PIK59ZUA3ADEJCQ281I0TDQ"',
99 silly get     age: '54',
99 silly get     connection: 'keep-alive',
99 silly get     'x-served-by': 'cache-atl6222-ATL',
99 silly get     'x-cache': 'HIT',
99 silly get     'x-cache-hits': '6',
99 silly get     'x-timer': 'S1439323961.288251,VS0,VE0',
99 silly get     vary: 'Accept' } ]
100 verbose etag https://registry.npmjs.org/nan from cache
101 http 304 https://registry.npmjs.org/bindings
102 silly get cb [ 304,
102 silly get   { date: 'Tue, 11 Aug 2015 20:12:41 GMT',
102 silly get     via: '1.1 varnish',
102 silly get     'cache-control': 'max-age=60',
102 silly get     etag: '"BCS5XYG9ISNJFNKEL5FLOI5HX"',
102 silly get     age: '3',
102 silly get     connection: 'keep-alive',
102 silly get     'x-served-by': 'cache-atl6235-ATL',
102 silly get     'x-cache': 'HIT',
102 silly get     'x-cache-hits': '1',
102 silly get     'x-timer': 'S1439323961.310843,VS0,VE14',
102 silly get     vary: 'Accept' } ]
103 verbose etag https://registry.npmjs.org/bindings from cache
104 silly addNameRange number 2 { name: 'nan', range: '>=1.8.4 <1.9.0', hasData: true }
105 silly addNameRange versions [ 'nan',
105 silly addNameRange   [ '0.3.0-wip',
105 silly addNameRange     '0.3.0-wip2',
105 silly addNameRange     '0.3.0',
105 silly addNameRange     '0.3.1',
105 silly addNameRange     '0.3.2',
105 silly addNameRange     '0.4.0',
105 silly addNameRange     '0.4.1',
105 silly addNameRange     '0.4.2',
105 silly addNameRange     '0.4.3',
105 silly addNameRange     '0.4.4',
105 silly addNameRange     '0.5.0',
105 silly addNameRange     '0.5.1',
105 silly addNameRange     '0.5.2',
105 silly addNameRange     '0.6.0',
105 silly addNameRange     '0.7.0',
105 silly addNameRange     '0.7.1',
105 silly addNameRange     '0.8.0',
105 silly addNameRange     '1.0.0',
105 silly addNameRange     '1.1.0',
105 silly addNameRange     '1.1.1',
105 silly addNameRange     '1.1.2',
105 silly addNameRange     '1.2.0',
105 silly addNameRange     '1.3.0',
105 silly addNameRange     '1.4.0',
105 silly addNameRange     '1.4.1',
105 silly addNameRange     '1.5.0',
105 silly addNameRange     '1.4.2',
105 silly addNameRange     '1.4.3',
105 silly addNameRange     '1.5.1',
105 silly addNameRange     '1.5.2',
105 silly addNameRange     '1.6.0',
105 silly addNameRange     '1.5.3',
105 silly addNameRange     '1.6.1',
105 silly addNameRange     '1.6.2',
105 silly addNameRange     '1.7.0',
105 silly addNameRange     '1.8.0',
105 silly addNameRange     '1.8.1',
105 silly addNameRange     '1.8.2',
105 silly addNameRange     '1.8.3',
105 silly addNameRange     '1.8.4',
105 silly addNameRange     '1.9.0',
105 silly addNameRange     '2.0.0',
105 silly addNameRange     '2.0.1',
105 silly addNameRange     '2.0.2',
105 silly addNameRange     '2.0.3',
105 silly addNameRange     '2.0.4',
105 silly addNameRange     '2.0.5' ] ]
106 verbose addNamed [email protected]
107 silly addNamed semver.valid 1.8.4
108 silly addNamed semver.validRange 1.8.4
109 silly addNameRange number 2 { name: 'bindings', range: '*', hasData: true }
110 silly addNameRange versions [ 'bindings',
110 silly addNameRange   [ '0.0.1',
110 silly addNameRange     '0.1.0',
110 silly addNameRange     '0.1.1',
110 silly addNameRange     '0.2.0',
110 silly addNameRange     '0.2.1',
110 silly addNameRange     '0.2.2',
110 silly addNameRange     '0.2.3',
110 silly addNameRange     '0.2.4',
110 silly addNameRange     '0.3.0',
110 silly addNameRange     '0.4.0',
110 silly addNameRange     '1.0.0',
110 silly addNameRange     '1.1.0',
110 silly addNameRange     '1.1.1',
110 silly addNameRange     '1.2.0',
110 silly addNameRange     '1.2.1' ] ]
111 verbose addNamed [email protected]
112 silly addNamed semver.valid 1.2.1
113 silly addNamed semver.validRange 1.2.1
114 silly cache afterAdd [email protected]
115 verbose afterAdd /root/.npm/nan/1.8.4/package/package.json not in flight; writing
116 silly cache afterAdd [email protected]
117 verbose afterAdd /root/.npm/bindings/1.2.1/package/package.json not in flight; writing
118 verbose afterAdd /root/.npm/nan/1.8.4/package/package.json written
119 verbose afterAdd /root/.npm/bindings/1.2.1/package/package.json written
120 silly install resolved [ { name: 'nan',
120 silly install resolved     version: '1.8.4',
120 silly install resolved     description: 'Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility',
120 silly install resolved     main: 'include_dirs.js',
120 silly install resolved     repository: { type: 'git', url: 'git://github.com/iojs/nan.git' },
120 silly install resolved     scripts:
120 silly install resolved      { test: 'tap --gc test/js/*-test.js',
120 silly install resolved        'rebuild-tests': 'pangyp rebuild --directory test' },
120 silly install resolved     contributors:
120 silly install resolved      [ [Object],
120 silly install resolved        [Object],
120 silly install resolved        [Object],
120 silly install resolved        [Object],
120 silly install resolved        [Object],
120 silly install resolved        [Object],
120 silly install resolved        [Object] ],
120 silly install resolved     devDependencies:
120 silly install resolved      { bindings: '~1.2.1',
120 silly install resolved        'node-gyp': '~1.0.2',
120 silly install resolved        pangyp: '~2.0.1',
120 silly install resolved        tap: '~0.7.1',
120 silly install resolved        xtend: '~4.0.0' },
120 silly install resolved     license: 'MIT',
120 silly install resolved     gitHead: 'ed3bbf4ced0cf7937b4e4164766797f71aa97f3d',
120 silly install resolved     bugs: { url: 'https://github.com/iojs/nan/issues' },
120 silly install resolved     homepage: 'https://github.com/iojs/nan#readme',
120 silly install resolved     _id: '[email protected]',
120 silly install resolved     _shasum: '3c76b5382eab33e44b758d2813ca9d92e9342f34',
120 silly install resolved     _from: 'nan@>=1.8.4 <1.9.0',
120 silly install resolved     _npmVersion: '2.8.3',
120 silly install resolved     _nodeVersion: '0.12.2',
120 silly install resolved     _npmUser: { name: 'kkoopa', email: '[email protected]' },
120 silly install resolved     maintainers: [ [Object], [Object] ],
120 silly install resolved     dist:
120 silly install resolved      { shasum: '3c76b5382eab33e44b758d2813ca9d92e9342f34',
120 silly install resolved        tarball: 'http://registry.npmjs.org/nan/-/nan-1.8.4.tgz' },
120 silly install resolved     directories: {},
120 silly install resolved     _resolved: 'https://registry.npmjs.org/nan/-/nan-1.8.4.tgz',
120 silly install resolved     readme: 'ERROR: No README data found!' },
120 silly install resolved   { name: 'bindings',
120 silly install resolved     description: 'Helper module for loading your native module\'s .node file',
120 silly install resolved     keywords: [ 'native', 'addon', 'bindings', 'gyp', 'waf', 'c', 'c++' ],
120 silly install resolved     version: '1.2.1',
120 silly install resolved     author:
120 silly install resolved      { name: 'Nathan Rajlich',
120 silly install resolved        email: '[email protected]',
120 silly install resolved        url: 'http://tootallnate.net' },
120 silly install resolved     repository:
120 silly install resolved      { type: 'git',
120 silly install resolved        url: 'git://github.com/TooTallNate/node-bindings.git' },
120 silly install resolved     main: './bindings.js',
120 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-bindings/issues' },
120 silly install resolved     homepage: 'https://github.com/TooTallNate/node-bindings',
120 silly install resolved     license: 'MIT',
120 silly install resolved     gitHead: 'e404152ee27f8478ccbc7122ee051246e8e5ec02',
120 silly install resolved     _id: '[email protected]',
120 silly install resolved     scripts: {},
120 silly install resolved     _shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
120 silly install resolved     _from: 'bindings@*',
120 silly install resolved     _npmVersion: '1.4.14',
120 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
120 silly install resolved     maintainers: [ [Object], [Object] ],
120 silly install resolved     dist:
120 silly install resolved      { shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
120 silly install resolved        tarball: 'http://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz' },
120 silly install resolved     directories: {},
120 silly install resolved     _resolved: 'https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz',
120 silly install resolved     readme: 'ERROR: No README data found!' } ]
121 info install [email protected] into /var/repo/test/node_modules/weak
122 info install [email protected] into /var/repo/test/node_modules/weak
123 info installOne [email protected]
124 verbose installOne of nan to /var/repo/test/node_modules/weak not in flight; installing
125 info installOne [email protected]
126 verbose installOne of bindings to /var/repo/test/node_modules/weak not in flight; installing
127 verbose lock using /root/.npm/_locks/nan-2c2c529898cfa7a4.lock for /var/repo/test/node_modules/weak/node_modules/nan
128 verbose lock using /root/.npm/_locks/bindings-c755832aea06da46.lock for /var/repo/test/node_modules/weak/node_modules/bindings
129 silly install write writing nan 1.8.4 to /var/repo/test/node_modules/weak/node_modules/nan
130 silly cache addNamed cb [email protected]
131 verbose unbuild node_modules/weak/node_modules/nan
132 silly install write writing bindings 1.2.1 to /var/repo/test/node_modules/weak/node_modules/bindings
133 silly cache addNamed cb [email protected]
134 verbose unbuild node_modules/weak/node_modules/bindings
135 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak/node_modules/nan
136 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak/node_modules/bindings
137 verbose tar unpack /root/.npm/nan/1.8.4/package.tgz
138 verbose tar unpacking to /var/repo/test/node_modules/weak/node_modules/nan
139 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak/node_modules/nan
140 verbose tar unpack /root/.npm/bindings/1.2.1/package.tgz
141 verbose tar unpacking to /var/repo/test/node_modules/weak/node_modules/bindings
142 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak/node_modules/bindings
143 silly gunzTarPerm modes [ '755', '644' ]
144 silly gunzTarPerm modes [ '755', '644' ]
145 silly gunzTarPerm extractEntry package.json
146 silly gunzTarPerm modified mode [ 'package.json', 436, 420 ]
147 silly gunzTarPerm extractEntry package.json
148 silly gunzTarPerm extractEntry README.md
149 silly gunzTarPerm modified mode [ 'README.md', 436, 420 ]
150 silly gunzTarPerm extractEntry include_dirs.js
151 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 420 ]
152 silly gunzTarPerm extractEntry README.md
153 silly gunzTarPerm extractEntry bindings.js
154 silly gunzTarPerm extractEntry LICENSE.md
155 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 420 ]
156 silly gunzTarPerm extractEntry .dntrc
157 silly gunzTarPerm modified mode [ '.dntrc', 436, 420 ]
158 silly gunzTarPerm extractEntry appveyor.yml
159 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 420 ]
160 silly gunzTarPerm extractEntry nan.h
161 silly gunzTarPerm modified mode [ 'nan.h', 436, 420 ]
162 info preinstall [email protected]
163 silly install resolved []
164 verbose about to build /var/repo/test/node_modules/weak/node_modules/bindings
165 info build /var/repo/test/node_modules/weak/node_modules/bindings
166 verbose linkStuff [ false,
166 verbose linkStuff   false,
166 verbose linkStuff   false,
166 verbose linkStuff   '/var/repo/test/node_modules/weak/node_modules' ]
167 info linkStuff [email protected]
168 verbose linkBins [email protected]
169 verbose linkMans [email protected]
170 verbose rebuildBundles [email protected]
171 info install [email protected]
172 info postinstall [email protected]
173 verbose unlock done using /root/.npm/_locks/bindings-c755832aea06da46.lock for /var/repo/test/node_modules/weak/node_modules/bindings
174 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
175 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 420 ]
176 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
177 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 420 ]
178 silly gunzTarPerm extractEntry nan_new.h
179 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 420 ]
180 silly gunzTarPerm extractEntry nan_string_bytes.h
181 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 420 ]
182 silly gunzTarPerm extractEntry CHANGELOG.md
183 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 420 ]
184 info preinstall [email protected]
185 silly install resolved []
186 verbose about to build /var/repo/test/node_modules/weak/node_modules/nan
187 info build /var/repo/test/node_modules/weak/node_modules/nan
188 verbose linkStuff [ false,
188 verbose linkStuff   false,
188 verbose linkStuff   false,
188 verbose linkStuff   '/var/repo/test/node_modules/weak/node_modules' ]
189 info linkStuff [email protected]
190 verbose linkBins [email protected]
191 verbose linkMans [email protected]
192 verbose rebuildBundles [email protected]
193 info install [email protected]
194 info postinstall [email protected]
195 verbose unlock done using /root/.npm/_locks/nan-2c2c529898cfa7a4.lock for /var/repo/test/node_modules/weak/node_modules/nan
196 verbose about to build /var/repo/test/node_modules/weak
197 info build /var/repo/test/node_modules/weak
198 verbose linkStuff [ false, false, false, '/var/repo/test/node_modules' ]
199 info linkStuff [email protected]
200 verbose linkBins [email protected]
201 verbose linkMans [email protected]
202 verbose rebuildBundles [email protected]
203 verbose rebuildBundles [ 'bindings', 'nan' ]
204 info install [email protected]
205 verbose unsafe-perm in lifecycle false
206 info [email protected] Failed to exec install script
207 verbose unlock done using /root/.npm/_locks/weak-3d3666efd27349a0.lock for /var/repo/test/node_modules/weak
208 verbose stack Error: [email protected] install: `node-gyp rebuild`
208 verbose stack Exit status 1
208 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
208 verbose stack     at EventEmitter.emit (events.js:98:17)
208 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
208 verbose stack     at ChildProcess.emit (events.js:98:17)
208 verbose stack     at maybeClose (child_process.js:756:16)
208 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:823:5)
209 verbose pkgid [email protected]
210 verbose cwd /var/repo/test
211 error Linux 3.8.13-bone70
212 error argv "node" "/usr/local/bin/npm" "install" "weak"
213 error node v0.10.33
214 error npm  v2.1.11
215 error code ELIFECYCLE
216 error [email protected] install: `node-gyp rebuild`
216 error Exit status 1
217 error Failed at the [email protected] install script 'node-gyp rebuild'.
217 error This is most likely a problem with the weak package,
217 error not with npm itself.
217 error Tell the author that this fails on your system:
217 error     node-gyp rebuild
217 error You can get their info via:
217 error     npm owner ls weak
217 error There is likely additional logging output above.
218 verbose exit [ 1, true ]
219 verbose unbuild node_modules/weak
220 info preuninstall [email protected]
221 info uninstall [email protected]
222 verbose unbuild rmStuff [email protected] from /var/repo/test/node_modules
223 info postuninstall [email protected]
224 verbose gentlyRm vacuuming /var/repo/test/node_modules/weak
225 silly gentlyRm purging /var/repo/test/node_modules/weak
226 silly gentlyRm removing /var/repo/test/node_modules
227 silly gentlyRm finished vacuuming up to /var/repo/test

error: could not configure a cxx compiler! [solved placed in error]

I am getting upon install, I use ubuntu 104 lts for dev, I am getting this on install, the exact error message is.
[email protected] preinstall: node-waf clean || (exit 0); node-waf configure build
npm ERR! sh "-c" "node-waf clean || (exit 0); node-waf configure build" failed with 1

gcc is installed, I am unclear what is not finding, any help would be great.

thanks in advance.

--jerry

Question: what is cleanup for?

In the readme, the example has a cleanup function called before the object is garbage collected. But I'm wondering, if the object is going to be garbage collected, why do you need to delete its properties?

configure error

I've been trying to install weak but got error:

sudo npm install -g weak --nodedir

npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install /usr/local/lib/node_modules/weak
> node-gyp rebuild

python: can't open file '/usr/local/lib/node_modules/weak/true/tools/gyp/gyp': [Errno 2] No such file or directory
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:350:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:684:12)
gyp ERR! stack     at process.startup.processMakeCallback.process._makeCallback (node.js:248:20)
gyp ERR! System Linux 3.1.9+
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/weak
gyp ERR! node -v v0.9.2-pre
gyp ERR! node-gyp -v v0.6.9
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 weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.1.9+
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "weak" "--nodedir"
npm ERR! cwd /home/pi/test
npm ERR! node -v v0.9.2-pre
npm ERR! npm -v 1.1.59
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/test/npm-debug.log
npm ERR! not ok code 0

node-weak causes JS code preemption due to MakeCallback

(Pre-disclaimer, apologies if anything I say here is incorrect or overly alarmist. I think this is a real problem but I don't pretend to understand everything that's going on here, especially the Node and V8 codebase I'm not very familiar with.)

I've seen some problems in my NodeJS app using node-weak which seemed like they could only be explained by my code getting preempted by other JS code that changed state out from under it. I believe I've eventually traced this to the use of MakeCallback in Node's native code (src/node.cc); when it's called, it calls not only the callback you told it to call but also all registered nextTick callbacks. And node-weak invokes MakeCallback from GC, which basically means, from anywhere.

Here's a demo of the problem.

I started a thread about this on the NodeJS mailing list, too.

To the best of my evolving understanding, either

  • MakeCallback should be taught to only invoke process._tickCallback when it was invoked directly from the libuv event loop, not if it was invoked by something like node-weak in a nested execution context
  • MakeCallback is a dangerous API to expose to extension code directly, or at least needs to be better documented about when to use it and when to avoid it
  • node-weak, when invoking the cleanup callback (and its "global" callback which I don't really understand), should invoke those callbacks directly instead of via MakeCallback

I don't mean to malign node-weak; it's very cool and very useful functionality, but this side effect of preempting code and executing pretty much arbitrary any other code during GC is quite alarming.

Unable to install via npm on Mac OS X Lion

$ npm install weak
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install /Users/timothyjoelwright/Documents/Project Jack/Code/node_modules/weak
> node-gyp rebuild

info it worked if it ends with ok 
spawn python [ '/Users/timothyjoelwright/.node-gyp/0.6.15/tools/gyp_addon',
  'binding.gyp',
  '-I/Users/timothyjoelwright/Documents/Project Jack/Code/node_modules/weak/build/config.gypi',
  '-f',
  'make' ]
  File "/Users/timothyjoelwright/.node-gyp/0.6.15/tools/gyp_addon", line 40
    print 'Error running GYP'
                            ^
SyntaxError: invalid syntax
ERR! Error: `gyp_addon` failed with exit code: 1
    at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:242:18)
    at EventEmitter._tickCallback (node.js:192:40)
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 weak 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 weak
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "/Users/timothyjoelwright/Downloads/TooTallNate-node-weak-v0.2.1-0-ga6152bb.tar.gz"
npm ERR! cwd /Users/timothyjoelwright/Documents/Project Jack/Code
npm ERR! node -v v0.6.15
npm ERR! npm -v 1.1.16
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/timothyjoelwright/Documents/Project Jack/Code/npm-debug.log
npm not ok

Any help is very much appreciated!

Python 2.7.2 (default, Mar 14 2012, 19:43:49)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.54)] on darwin
Node v0.6.15

Can I 'save' an object from being GC'ed?

Exactly what the title says.

If I store a new reference in the weak callback, can I save it?

If so, the object is the same or is it a copy? I mean, the callback will keep being called every time it is about to die, or I need to renew it?

Error: `make` failed with exit code: 2

Installing the phantomjs-node package on my linux vm, I keep getting the below errors. I got the same error when I tried to do npm install weak on its own as well.


> [email protected] install /srv/outlining/src/node_modules/weak
> node-gyp rebuild

make: Entering directory `/srv/outlining/src/node_modules/weak/build'
  CXX(target) Release/obj.target/weakref/src/weakref.o
make: g++: Command not found
make: *** [Release/obj.target/weakref/src/weakref.o] Error 127
make: Leaving directory `/srv/outlining/src/node_modules/weak/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.2.0-23-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /srv/outlining/src/node_modules/weak
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "weak"
npm ERR! cwd /srv/outlining/src
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /srv/outlining/src/npm-debug.log
npm ERR! not ok code 0

gc callback not always fired

while hunting a memory leak in a clients application i wrote https://github.com/soldair/weak-tracker. After a lot of chasing my own tail found that many gc events never get fired even though the refs are dead (as tested with weak.isDead)

I spent a little time trying to reproduce it outside of their code base and haven't yet but i wanted to document the problem and my work around so maybe someone with a better understanding of v8 gc can figure it out.

https://github.com/soldair/weak-tracker/blob/master/index.js#L90

this is really important because if this event fails to fire it kinda defeats the purpose of the module.

Error installing on `node-gyp rebuild`

An error occures installing weak on the node-gyp rebuild statement.

installing node-gyp manually with npm install node-gyp does not pose a problem, and installs just fine, thus this leads me to believe it is the way node-weak uses node-gyp that makes the install fail.

sander@kyoto ~/projects/astad/www $ npm i weak
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/weak/-/weak-0.3.3.tgz
npm http 200 https://registry.npmjs.org/weak/-/weak-0.3.3.tgz
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/nan/-/nan-1.2.0.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-1.2.0.tgz
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install /home/sander/projects/astad/www/node_modules/weak
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/sander/projects/astad/www/node_modules/weak
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "i" "weak"
npm ERR! cwd /home/sander/projects/astad/www
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/sander/projects/astad/www/npm-debug.log
npm ERR! not ok code 0

Install errors using node 0.12.7: ECONNRESET

Works fine if I switch to Node v0.10.40, but errors on v0.12.{6,7}. Here is the log from npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/OliverJAsh/.nvm/versions/node/v0.12.7/bin/node',
1 verbose cli   '/Users/OliverJAsh/.nvm/versions/node/v0.12.7/bin/npm',
1 verbose cli   'i',
1 verbose cli   'weak' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of /Users/OliverJAsh/Development/frontend/package.json
5 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/package.json
6 verbose readDependencies npm-shrinkwrap.json is overriding dependencies
7 info shrinkwrap file "/Users/OliverJAsh/Development/frontend/npm-shrinkwrap.json"
8 verbose readDependencies returned deps { babel: '5.8.21',
8 verbose readDependencies returned deps   btoa: '1.1.2',
8 verbose readDependencies returned deps   'check-dependencies': '0.11.0',
8 verbose readDependencies returned deps   eslint: '1.5.1',
8 verbose readDependencies returned deps   'eslint-plugin-jasmine': '1.5.0',
8 verbose readDependencies returned deps   'eslint-plugin-react': '3.6.3',
8 verbose readDependencies returned deps   esprima: '1.2.2',
8 verbose readDependencies returned deps   glob: '4.0.6',
8 verbose readDependencies returned deps   grunt: '0.4.5',
8 verbose readDependencies returned deps   'grunt-asset-hash': '0.1.6',
8 verbose readDependencies returned deps   'grunt-asset-monitor': '0.2.0',
8 verbose readDependencies returned deps   'grunt-autoprefixer': '3.0.3',
8 verbose readDependencies returned deps   'grunt-bytesize': '0.1.1',
8 verbose readDependencies returned deps   'grunt-concurrent': '1.0.0',
8 verbose readDependencies returned deps   'grunt-contrib-clean': '0.6.0',
8 verbose readDependencies returned deps   'grunt-contrib-copy': '0.6.0',
8 verbose readDependencies returned deps   'grunt-contrib-requirejs': '0.4.4',
8 verbose readDependencies returned deps   'grunt-contrib-uglify': '0.9.1',
8 verbose readDependencies returned deps   'grunt-contrib-watch': '0.6.1',
8 verbose readDependencies returned deps   'grunt-csdevmode': '0.1.2',
8 verbose readDependencies returned deps   'grunt-css-metrics': '0.1.2',
8 verbose readDependencies returned deps   'grunt-eslint': '17.3.1',
8 verbose readDependencies returned deps   'grunt-frequency-graph': '0.1.6',
8 verbose readDependencies returned deps   'grunt-hologram': '0.0.4',
8 verbose readDependencies returned deps   'grunt-jscs': '2.2.0',
8 verbose readDependencies returned deps   'grunt-karma': '0.10.1',
8 verbose readDependencies returned deps   'grunt-mkdir': '0.1.2',
8 verbose readDependencies returned deps   'grunt-pagespeed': '0.3.0',
8 verbose readDependencies returned deps   'grunt-px-to-rem': '0.4.0',
8 verbose readDependencies returned deps   'grunt-sass': '1.0.0',
8 verbose readDependencies returned deps   'grunt-scss-lint': '0.3.3',
8 verbose readDependencies returned deps   'grunt-shell': '1.1.1',
8 verbose readDependencies returned deps   'grunt-svgmin': '2.0.1',
8 verbose readDependencies returned deps   'grunt-text-replace': '0.3.12',
8 verbose readDependencies returned deps   'grunt-webfontjson': '0.0.4',
8 verbose readDependencies returned deps   handlebars: '2.0.0',
8 verbose readDependencies returned deps   'jasmine-core': '2.3.4',
8 verbose readDependencies returned deps   'jit-grunt': '0.9.1',
8 verbose readDependencies returned deps   jsonfile: '2.0.0',
8 verbose readDependencies returned deps   karma: '0.12.31',
8 verbose readDependencies returned deps   'karma-chrome-launcher': '0.1.10',
8 verbose readDependencies returned deps   'karma-coffee-preprocessor': '0.2.1',
8 verbose readDependencies returned deps   'karma-coverage': '0.3.1',
8 verbose readDependencies returned deps   'karma-firefox-launcher': '0.1.6',
8 verbose readDependencies returned deps   'karma-html2js-preprocessor': '0.1.0',
8 verbose readDependencies returned deps   'karma-jasmine': '0.3.5',
8 verbose readDependencies returned deps   'karma-phantomjs-launcher': '0.1.4',
8 verbose readDependencies returned deps   'karma-phantomjs-shim': '1.1.1',
8 verbose readDependencies returned deps   'karma-requirejs': '0.2.2',
8 verbose readDependencies returned deps   'karma-script-launcher': '0.1.0',
8 verbose readDependencies returned deps   'karma-spec-reporter': '0.0.19',
8 verbose readDependencies returned deps   'load-grunt-config': '0.17.1',
8 verbose readDependencies returned deps   lodash: '3.10.1',
8 verbose readDependencies returned deps   megalog: '0.1.0',
8 verbose readDependencies returned deps   mkdirp: '0.5.0',
8 verbose readDependencies returned deps   moment: '2.8.3',
8 verbose readDependencies returned deps   phantom: '0.6.5',
8 verbose readDependencies returned deps   phantomjs: '1.9.18',
8 verbose readDependencies returned deps   q: '1.0.1',
8 verbose readDependencies returned deps   requirejs: '2.1.20',
8 verbose readDependencies returned deps   shoe: '0.0.11',
8 verbose readDependencies returned deps   'sorted-object': '1.0.0',
8 verbose readDependencies returned deps   svgo: '0.4.5',
8 verbose readDependencies returned deps   'time-grunt': '1.2.0' }
9 silly cache add args [ 'weak', null ]
10 verbose cache add spec weak
11 silly cache add parsed spec { raw: 'weak',
11 silly cache add   scope: null,
11 silly cache add   name: 'weak',
11 silly cache add   rawSpec: '',
11 silly cache add   spec: '*',
11 silly cache add   type: 'range' }
12 silly addNamed weak@*
13 verbose addNamed "*" is a valid semver range for weak
14 silly addNameRange { name: 'weak', range: '*', hasData: false }
15 silly mapToRegistry name weak
16 silly mapToRegistry using default registry
17 silly mapToRegistry registry https://registry.npmjs.org/
18 silly mapToRegistry uri https://registry.npmjs.org/weak
19 verbose addNameRange registry:https://registry.npmjs.org/weak not in flight; fetching
20 verbose request uri https://registry.npmjs.org/weak
21 verbose request no auth needed
22 info attempt registry request try #1 at 2:31:41 PM
23 verbose request id f59aba51a4467681
24 verbose etag "C06FCHTAD0V9QYUWNPXAFG5K6"
25 http request GET https://registry.npmjs.org/weak
26 http 304 https://registry.npmjs.org/weak
27 silly get cb [ 304,
27 silly get   { date: 'Fri, 30 Oct 2015 14:31:41 GMT',
27 silly get     via: '1.1 varnish',
27 silly get     'cache-control': 'max-age=60',
27 silly get     etag: '"C06FCHTAD0V9QYUWNPXAFG5K6"',
27 silly get     age: '39',
27 silly get     connection: 'keep-alive',
27 silly get     'x-served-by': 'cache-lcy1120-LCY',
27 silly get     'x-cache': 'HIT',
27 silly get     'x-cache-hits': '1',
27 silly get     'x-timer': 'S1446215501.999828,VS0,VE0',
27 silly get     vary: 'Accept' } ]
28 verbose etag https://registry.npmjs.org/weak from cache
29 verbose get saving weak to /Users/OliverJAsh/.npm/registry.npmjs.org/weak/.cache.json
30 silly addNameRange number 2 { name: 'weak', range: '*', hasData: true }
31 silly addNameRange versions [ 'weak',
31 silly addNameRange   [ '0.0.1',
31 silly addNameRange     '0.1.0',
31 silly addNameRange     '0.1.1',
31 silly addNameRange     '0.1.2',
31 silly addNameRange     '0.1.3',
31 silly addNameRange     '0.1.4',
31 silly addNameRange     '0.1.5',
31 silly addNameRange     '0.2.0',
31 silly addNameRange     '0.2.1',
31 silly addNameRange     '0.2.2',
31 silly addNameRange     '0.3.0',
31 silly addNameRange     '0.3.1',
31 silly addNameRange     '0.3.2',
31 silly addNameRange     '0.3.3',
31 silly addNameRange     '0.3.4',
31 silly addNameRange     '0.4.0',
31 silly addNameRange     '0.4.1',
31 silly addNameRange     '1.0.0' ] ]
32 silly addNamed [email protected]
33 verbose addNamed "1.0.0" is a plain semver version for weak
34 silly cache afterAdd [email protected]
35 verbose afterAdd /Users/OliverJAsh/.npm/weak/1.0.0/package/package.json not in flight; writing
36 verbose afterAdd /Users/OliverJAsh/.npm/weak/1.0.0/package/package.json written
37 silly install resolved [ { author: { name: 'Ben Noordhuis', email: '[email protected]' },
37 silly install resolved     contributors: [ [Object] ],
37 silly install resolved     name: 'weak',
37 silly install resolved     license: 'MIT',
37 silly install resolved     description: 'Make weak references to JavaScript Objects.',
37 silly install resolved     keywords:
37 silly install resolved      [ 'weak',
37 silly install resolved        'reference',
37 silly install resolved        'js',
37 silly install resolved        'javascript',
37 silly install resolved        'object',
37 silly install resolved        'function',
37 silly install resolved        'callback' ],
37 silly install resolved     version: '1.0.0',
37 silly install resolved     repository:
37 silly install resolved      { type: 'git',
37 silly install resolved        url: 'git://github.com/TooTallNate/node-weak.git' },
37 silly install resolved     main: 'lib/weak.js',
37 silly install resolved     scripts:
37 silly install resolved      { test: 'mocha -gc --reporter spec',
37 silly install resolved        install: 'node-gyp rebuild' },
37 silly install resolved     dependencies: { bindings: '^1.2.1', nan: '^2.0.5' },
37 silly install resolved     devDependencies: { mocha: '~2.1.0' },
37 silly install resolved     gypfile: true,
37 silly install resolved     gitHead: '780164bf6d5dbc00841b05e6d888eba3ca9e9bdd',
37 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-weak/issues' },
37 silly install resolved     homepage: 'https://github.com/TooTallNate/node-weak#readme',
37 silly install resolved     _id: '[email protected]',
37 silly install resolved     _shasum: '3f2c2929e0a6963bf85a88f84782a8c0bfe10006',
37 silly install resolved     _from: 'weak@*',
37 silly install resolved     _npmVersion: '2.13.3',
37 silly install resolved     _nodeVersion: '3.0.0',
37 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
37 silly install resolved     maintainers: [ [Object], [Object] ],
37 silly install resolved     dist:
37 silly install resolved      { shasum: '3f2c2929e0a6963bf85a88f84782a8c0bfe10006',
37 silly install resolved        tarball: 'http://registry.npmjs.org/weak/-/weak-1.0.0.tgz' },
37 silly install resolved     directories: {},
37 silly install resolved     _resolved: 'https://registry.npmjs.org/weak/-/weak-1.0.0.tgz',
37 silly install resolved     readme: 'ERROR: No README data found!' } ]
38 info install [email protected] into /Users/OliverJAsh/Development/frontend
39 info installOne [email protected]
40 verbose installOne of weak to /Users/OliverJAsh/Development/frontend not in flight; installing
41 verbose lock using /Users/OliverJAsh/.npm/_locks/weak-450619083d6d2a46.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak
42 silly install write writing weak 1.0.0 to /Users/OliverJAsh/Development/frontend/node_modules/weak
43 verbose unbuild node_modules/weak
44 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak is being purged from base /Users/OliverJAsh/Development/frontend
45 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak
46 verbose tar unpack /Users/OliverJAsh/.npm/weak/1.0.0/package.tgz
47 verbose tar unpacking to /Users/OliverJAsh/Development/frontend/node_modules/weak
48 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak is being purged
49 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak
50 silly gunzTarPerm modes [ '755', '644' ]
51 silly gunzTarPerm extractEntry package.json
52 silly gunzTarPerm extractEntry .npmignore
53 silly gunzTarPerm extractEntry README.md
54 silly gunzTarPerm extractEntry LICENSE
55 silly gunzTarPerm extractEntry binding.gyp
56 silly gunzTarPerm extractEntry .travis.yml
57 silly gunzTarPerm extractEntry appveyor.yml
58 silly gunzTarPerm extractEntry History.md
59 silly gunzTarPerm extractEntry lib/weak.js
60 silly gunzTarPerm extractEntry src/weakref.cc
61 silly gunzTarPerm extractEntry test/buffer.js
62 silly gunzTarPerm extractEntry test/callback.js
63 silly gunzTarPerm extractEntry test/create.js
64 silly gunzTarPerm extractEntry test/exports.js
65 silly gunzTarPerm extractEntry test/weakref.js
66 verbose write writing to /Users/OliverJAsh/Development/frontend/node_modules/weak/package.json
67 info preinstall [email protected]
68 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/package.json
69 silly prepareForInstallMany adding bindings@^1.2.1 from weak dependencies
70 silly prepareForInstallMany adding nan@^2.0.5 from weak dependencies
71 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/package.json
72 silly cache add args [ 'bindings@^1.2.1', null ]
73 verbose cache add spec bindings@^1.2.1
74 silly cache add args [ 'nan@^2.0.5', null ]
75 verbose cache add spec nan@^2.0.5
76 silly cache add parsed spec { raw: 'bindings@^1.2.1',
76 silly cache add   scope: null,
76 silly cache add   name: 'bindings',
76 silly cache add   rawSpec: '^1.2.1',
76 silly cache add   spec: '>=1.2.1 <2.0.0',
76 silly cache add   type: 'range' }
77 silly addNamed bindings@>=1.2.1 <2.0.0
78 verbose addNamed ">=1.2.1 <2.0.0" is a valid semver range for bindings
79 silly addNameRange { name: 'bindings', range: '>=1.2.1 <2.0.0', hasData: false }
80 silly mapToRegistry name bindings
81 silly mapToRegistry using default registry
82 silly mapToRegistry registry https://registry.npmjs.org/
83 silly mapToRegistry uri https://registry.npmjs.org/bindings
84 verbose addNameRange registry:https://registry.npmjs.org/bindings not in flight; fetching
85 silly cache add parsed spec { raw: 'nan@^2.0.5',
85 silly cache add   scope: null,
85 silly cache add   name: 'nan',
85 silly cache add   rawSpec: '^2.0.5',
85 silly cache add   spec: '>=2.0.5 <3.0.0',
85 silly cache add   type: 'range' }
86 silly addNamed nan@>=2.0.5 <3.0.0
87 verbose addNamed ">=2.0.5 <3.0.0" is a valid semver range for nan
88 silly addNameRange { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: false }
89 silly mapToRegistry name nan
90 silly mapToRegistry using default registry
91 silly mapToRegistry registry https://registry.npmjs.org/
92 silly mapToRegistry uri https://registry.npmjs.org/nan
93 verbose addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
94 verbose request uri https://registry.npmjs.org/bindings
95 verbose request no auth needed
96 info attempt registry request try #1 at 2:31:42 PM
97 verbose etag "9T1GC8LK3NF0OJU9OPHCFIKS3"
98 http request GET https://registry.npmjs.org/bindings
99 verbose request uri https://registry.npmjs.org/nan
100 verbose request no auth needed
101 info attempt registry request try #1 at 2:31:42 PM
102 verbose etag "CJ3ZKOY24CWA1LM0KQ4KE7PG1"
103 http request GET https://registry.npmjs.org/nan
104 http 304 https://registry.npmjs.org/nan
105 silly get cb [ 304,
105 silly get   { date: 'Fri, 30 Oct 2015 14:31:42 GMT',
105 silly get     via: '1.1 varnish',
105 silly get     'cache-control': 'max-age=60',
105 silly get     etag: '"CJ3ZKOY24CWA1LM0KQ4KE7PG1"',
105 silly get     age: '10',
105 silly get     connection: 'keep-alive',
105 silly get     'x-served-by': 'cache-lcy1125-LCY',
105 silly get     'x-cache': 'HIT',
105 silly get     'x-cache-hits': '1',
105 silly get     'x-timer': 'S1446215502.119670,VS0,VE1',
105 silly get     vary: 'Accept' } ]
106 verbose etag https://registry.npmjs.org/nan from cache
107 verbose get saving nan to /Users/OliverJAsh/.npm/registry.npmjs.org/nan/.cache.json
108 http 304 https://registry.npmjs.org/bindings
109 silly get cb [ 304,
109 silly get   { date: 'Fri, 30 Oct 2015 14:31:42 GMT',
109 silly get     via: '1.1 varnish',
109 silly get     'cache-control': 'max-age=60',
109 silly get     etag: '"9T1GC8LK3NF0OJU9OPHCFIKS3"',
109 silly get     age: '3',
109 silly get     connection: 'keep-alive',
109 silly get     'x-served-by': 'cache-lcy1126-LCY',
109 silly get     'x-cache': 'HIT',
109 silly get     'x-cache-hits': '1',
109 silly get     'x-timer': 'S1446215502.125541,VS0,VE0',
109 silly get     vary: 'Accept' } ]
110 verbose etag https://registry.npmjs.org/bindings from cache
111 verbose get saving bindings to /Users/OliverJAsh/.npm/registry.npmjs.org/bindings/.cache.json
112 silly addNameRange number 2 { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: true }
113 silly addNameRange versions [ 'nan',
113 silly addNameRange   [ '0.3.0-wip',
113 silly addNameRange     '0.3.0-wip2',
113 silly addNameRange     '0.3.0',
113 silly addNameRange     '0.3.1',
113 silly addNameRange     '0.3.2',
113 silly addNameRange     '0.4.0',
113 silly addNameRange     '0.4.1',
113 silly addNameRange     '0.4.2',
113 silly addNameRange     '0.4.3',
113 silly addNameRange     '0.4.4',
113 silly addNameRange     '0.5.0',
113 silly addNameRange     '0.5.1',
113 silly addNameRange     '0.5.2',
113 silly addNameRange     '0.6.0',
113 silly addNameRange     '0.7.0',
113 silly addNameRange     '0.7.1',
113 silly addNameRange     '0.8.0',
113 silly addNameRange     '1.0.0',
113 silly addNameRange     '1.1.0',
113 silly addNameRange     '1.1.1',
113 silly addNameRange     '1.1.2',
113 silly addNameRange     '1.2.0',
113 silly addNameRange     '1.3.0',
113 silly addNameRange     '1.4.0',
113 silly addNameRange     '1.4.1',
113 silly addNameRange     '1.5.0',
113 silly addNameRange     '1.4.2',
113 silly addNameRange     '1.4.3',
113 silly addNameRange     '1.5.1',
113 silly addNameRange     '1.5.2',
113 silly addNameRange     '1.6.0',
113 silly addNameRange     '1.5.3',
113 silly addNameRange     '1.6.1',
113 silly addNameRange     '1.6.2',
113 silly addNameRange     '1.7.0',
113 silly addNameRange     '1.8.0',
113 silly addNameRange     '1.8.1',
113 silly addNameRange     '1.8.2',
113 silly addNameRange     '1.8.3',
113 silly addNameRange     '1.8.4',
113 silly addNameRange     '1.9.0',
113 silly addNameRange     '2.0.0',
113 silly addNameRange     '2.0.1',
113 silly addNameRange     '2.0.2',
113 silly addNameRange     '2.0.3',
113 silly addNameRange     '2.0.4',
113 silly addNameRange     '2.0.5',
113 silly addNameRange     '2.0.6',
113 silly addNameRange     '2.0.7',
113 silly addNameRange     '2.0.8',
113 silly addNameRange     '2.0.9',
113 silly addNameRange     '2.1.0' ] ]
114 silly addNamed [email protected]
115 verbose addNamed "2.1.0" is a plain semver version for nan
116 silly addNameRange number 2 { name: 'bindings', range: '>=1.2.1 <2.0.0', hasData: true }
117 silly addNameRange versions [ 'bindings',
117 silly addNameRange   [ '0.0.1',
117 silly addNameRange     '0.1.0',
117 silly addNameRange     '0.1.1',
117 silly addNameRange     '0.2.0',
117 silly addNameRange     '0.2.1',
117 silly addNameRange     '0.2.2',
117 silly addNameRange     '0.2.3',
117 silly addNameRange     '0.2.4',
117 silly addNameRange     '0.3.0',
117 silly addNameRange     '0.4.0',
117 silly addNameRange     '1.0.0',
117 silly addNameRange     '1.1.0',
117 silly addNameRange     '1.1.1',
117 silly addNameRange     '1.2.0',
117 silly addNameRange     '1.2.1' ] ]
118 silly addNamed [email protected]
119 verbose addNamed "1.2.1" is a plain semver version for bindings
120 silly cache afterAdd [email protected]
121 verbose afterAdd /Users/OliverJAsh/.npm/nan/2.1.0/package/package.json not in flight; writing
122 silly cache afterAdd [email protected]
123 verbose afterAdd /Users/OliverJAsh/.npm/bindings/1.2.1/package/package.json not in flight; writing
124 verbose afterAdd /Users/OliverJAsh/.npm/nan/2.1.0/package/package.json written
125 verbose afterAdd /Users/OliverJAsh/.npm/bindings/1.2.1/package/package.json written
126 silly install resolved [ { name: 'nan',
126 silly install resolved     version: '2.1.0',
126 silly install resolved     description: 'Native Abstractions for Node.js: C++ header for Node 0.8 -> 4 compatibility',
126 silly install resolved     main: 'include_dirs.js',
126 silly install resolved     repository: { type: 'git', url: 'git://github.com/nodejs/nan.git' },
126 silly install resolved     scripts:
126 silly install resolved      { test: 'tap --gc test/js/*-test.js',
126 silly install resolved        'rebuild-tests': 'node-gyp rebuild --msvs_version=2013 --directory test',
126 silly install resolved        docs: 'doc/.build.sh' },
126 silly install resolved     contributors:
126 silly install resolved      [ [Object],
126 silly install resolved        [Object],
126 silly install resolved        [Object],
126 silly install resolved        [Object],
126 silly install resolved        [Object],
126 silly install resolved        [Object],
126 silly install resolved        [Object] ],
126 silly install resolved     devDependencies:
126 silly install resolved      { bindings: '~1.2.1',
126 silly install resolved        commander: '^2.8.1',
126 silly install resolved        glob: '^5.0.14',
126 silly install resolved        'node-gyp': '~3.0.1',
126 silly install resolved        tap: '~0.7.1',
126 silly install resolved        xtend: '~4.0.0' },
126 silly install resolved     license: 'MIT',
126 silly install resolved     bugs: { url: 'https://github.com/nodejs/nan/issues' },
126 silly install resolved     homepage: 'https://github.com/nodejs/nan#readme',
126 silly install resolved     _id: '[email protected]',
126 silly install resolved     _shasum: '020a7ccedc63fdee85f85967d5607849e74abbe8',
126 silly install resolved     _resolved: 'https://registry.npmjs.org/nan/-/nan-2.1.0.tgz',
126 silly install resolved     _from: 'nan@>=2.0.5 <3.0.0',
126 silly install resolved     _npmVersion: '3.3.5',
126 silly install resolved     _nodeVersion: '4.1.2',
126 silly install resolved     _npmUser: { name: 'kkoopa', email: '[email protected]' },
126 silly install resolved     dist:
126 silly install resolved      { shasum: '020a7ccedc63fdee85f85967d5607849e74abbe8',
126 silly install resolved        tarball: 'http://registry.npmjs.org/nan/-/nan-2.1.0.tgz' },
126 silly install resolved     maintainers: [ [Object], [Object] ],
126 silly install resolved     directories: {},
126 silly install resolved     readme: 'ERROR: No README data found!' },
126 silly install resolved   { name: 'bindings',
126 silly install resolved     description: 'Helper module for loading your native module\'s .node file',
126 silly install resolved     keywords: [ 'native', 'addon', 'bindings', 'gyp', 'waf', 'c', 'c++' ],
126 silly install resolved     version: '1.2.1',
126 silly install resolved     author:
126 silly install resolved      { name: 'Nathan Rajlich',
126 silly install resolved        email: '[email protected]',
126 silly install resolved        url: 'http://tootallnate.net' },
126 silly install resolved     repository:
126 silly install resolved      { type: 'git',
126 silly install resolved        url: 'git://github.com/TooTallNate/node-bindings.git' },
126 silly install resolved     main: './bindings.js',
126 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-bindings/issues' },
126 silly install resolved     homepage: 'https://github.com/TooTallNate/node-bindings',
126 silly install resolved     license: 'MIT',
126 silly install resolved     gitHead: 'e404152ee27f8478ccbc7122ee051246e8e5ec02',
126 silly install resolved     _id: '[email protected]',
126 silly install resolved     scripts: {},
126 silly install resolved     _shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
126 silly install resolved     _from: 'bindings@>=1.2.1 <2.0.0',
126 silly install resolved     _npmVersion: '1.4.14',
126 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
126 silly install resolved     maintainers: [ [Object], [Object] ],
126 silly install resolved     dist:
126 silly install resolved      { shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
126 silly install resolved        tarball: 'http://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz' },
126 silly install resolved     directories: {},
126 silly install resolved     _resolved: 'https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz',
126 silly install resolved     readme: 'ERROR: No README data found!' } ]
127 info install [email protected] into /Users/OliverJAsh/Development/frontend/node_modules/weak
128 info install [email protected] into /Users/OliverJAsh/Development/frontend/node_modules/weak
129 info installOne [email protected]
130 verbose installOne of nan to /Users/OliverJAsh/Development/frontend/node_modules/weak not in flight; installing
131 info installOne [email protected]
132 verbose installOne of bindings to /Users/OliverJAsh/Development/frontend/node_modules/weak not in flight; installing
133 verbose lock using /Users/OliverJAsh/.npm/_locks/nan-8bf48f1d5f8f5ca3.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
134 verbose lock using /Users/OliverJAsh/.npm/_locks/bindings-0a2dbae7661232be.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
135 silly install write writing nan 2.1.0 to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
136 silly install write writing bindings 1.2.1 to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
137 verbose unbuild node_modules/weak/node_modules/nan
138 verbose unbuild node_modules/weak/node_modules/bindings
139 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan is being purged from base /Users/OliverJAsh/Development/frontend
140 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
141 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings is being purged from base /Users/OliverJAsh/Development/frontend
142 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
143 verbose tar unpack /Users/OliverJAsh/.npm/nan/2.1.0/package.tgz
144 verbose tar unpacking to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
145 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan is being purged
146 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
147 verbose tar unpack /Users/OliverJAsh/.npm/bindings/1.2.1/package.tgz
148 verbose tar unpacking to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
149 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings is being purged
150 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
151 silly gunzTarPerm modes [ '755', '644' ]
152 silly gunzTarPerm modes [ '755', '644' ]
153 silly gunzTarPerm extractEntry package.json
154 silly gunzTarPerm modified mode [ 'package.json', 436, 420 ]
155 silly gunzTarPerm extractEntry package.json
156 silly gunzTarPerm extractEntry README.md
157 silly gunzTarPerm modified mode [ 'README.md', 436, 420 ]
158 silly gunzTarPerm extractEntry include_dirs.js
159 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 420 ]
160 silly gunzTarPerm extractEntry README.md
161 silly gunzTarPerm extractEntry bindings.js
162 silly gunzTarPerm extractEntry nan_converters.h
163 silly gunzTarPerm modified mode [ 'nan_converters.h', 436, 420 ]
164 silly gunzTarPerm extractEntry LICENSE.md
165 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 420 ]
166 silly gunzTarPerm extractEntry .dntrc
167 silly gunzTarPerm modified mode [ '.dntrc', 436, 420 ]
168 silly gunzTarPerm extractEntry appveyor.yml
169 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 420 ]
170 verbose write writing to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings/package.json
171 info preinstall [email protected]
172 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings/package.json
173 silly gunzTarPerm extractEntry doc/new.md
174 silly gunzTarPerm modified mode [ 'doc/new.md', 436, 420 ]
175 silly gunzTarPerm extractEntry doc/.build.sh
176 silly gunzTarPerm modified mode [ 'doc/.build.sh', 509, 493 ]
177 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings/package.json
178 silly install resolved []
179 verbose about to build /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
180 info build /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
181 silly gunzTarPerm extractEntry doc/buffers.md
182 silly gunzTarPerm modified mode [ 'doc/buffers.md', 436, 420 ]
183 silly gunzTarPerm extractEntry doc/callback.md
184 silly gunzTarPerm modified mode [ 'doc/callback.md', 436, 420 ]
185 info linkStuff [email protected]
186 silly linkStuff [email protected] has /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules as its parent node_modules
187 silly gunzTarPerm extractEntry doc/converters.md
188 silly gunzTarPerm modified mode [ 'doc/converters.md', 436, 420 ]
189 silly gunzTarPerm extractEntry doc/errors.md
190 silly gunzTarPerm modified mode [ 'doc/errors.md', 436, 420 ]
191 verbose linkBins [email protected]
192 verbose linkMans [email protected]
193 verbose rebuildBundles [email protected]
194 info install [email protected]
195 info postinstall [email protected]
196 verbose unlock done using /Users/OliverJAsh/.npm/_locks/bindings-0a2dbae7661232be.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/bindings
197 silly gunzTarPerm extractEntry doc/maybe_types.md
198 silly gunzTarPerm modified mode [ 'doc/maybe_types.md', 436, 420 ]
199 silly gunzTarPerm extractEntry doc/methods.md
200 silly gunzTarPerm modified mode [ 'doc/methods.md', 436, 420 ]
201 silly gunzTarPerm extractEntry doc/asyncworker.md
202 silly gunzTarPerm modified mode [ 'doc/asyncworker.md', 436, 420 ]
203 silly gunzTarPerm extractEntry doc/node_misc.md
204 silly gunzTarPerm modified mode [ 'doc/node_misc.md', 436, 420 ]
205 silly gunzTarPerm extractEntry doc/persistent.md
206 silly gunzTarPerm modified mode [ 'doc/persistent.md', 436, 420 ]
207 silly gunzTarPerm extractEntry doc/scopes.md
208 silly gunzTarPerm modified mode [ 'doc/scopes.md', 436, 420 ]
209 silly gunzTarPerm extractEntry doc/script.md
210 silly gunzTarPerm modified mode [ 'doc/script.md', 436, 420 ]
211 silly gunzTarPerm extractEntry doc/string_bytes.md
212 silly gunzTarPerm modified mode [ 'doc/string_bytes.md', 436, 420 ]
213 silly gunzTarPerm extractEntry doc/v8_internals.md
214 silly gunzTarPerm modified mode [ 'doc/v8_internals.md', 436, 420 ]
215 silly gunzTarPerm extractEntry doc/v8_misc.md
216 silly gunzTarPerm modified mode [ 'doc/v8_misc.md', 436, 420 ]
217 silly gunzTarPerm extractEntry nan.h
218 silly gunzTarPerm modified mode [ 'nan.h', 436, 420 ]
219 silly gunzTarPerm extractEntry nan_callbacks.h
220 silly gunzTarPerm modified mode [ 'nan_callbacks.h', 436, 420 ]
221 silly gunzTarPerm extractEntry nan_callbacks_12_inl.h
222 silly gunzTarPerm modified mode [ 'nan_callbacks_12_inl.h', 436, 420 ]
223 silly gunzTarPerm extractEntry nan_callbacks_pre_12_inl.h
224 silly gunzTarPerm modified mode [ 'nan_callbacks_pre_12_inl.h', 436, 420 ]
225 silly gunzTarPerm extractEntry nan_converters_43_inl.h
226 silly gunzTarPerm modified mode [ 'nan_converters_43_inl.h', 436, 420 ]
227 silly gunzTarPerm extractEntry nan_converters_pre_43_inl.h
228 silly gunzTarPerm modified mode [ 'nan_converters_pre_43_inl.h', 436, 420 ]
229 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
230 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 420 ]
231 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
232 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 420 ]
233 silly gunzTarPerm extractEntry nan_maybe_43_inl.h
234 silly gunzTarPerm modified mode [ 'nan_maybe_43_inl.h', 436, 420 ]
235 silly gunzTarPerm extractEntry nan_maybe_pre_43_inl.h
236 silly gunzTarPerm modified mode [ 'nan_maybe_pre_43_inl.h', 436, 420 ]
237 silly gunzTarPerm extractEntry nan_new.h
238 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 420 ]
239 silly gunzTarPerm extractEntry nan_object_wrap.h
240 silly gunzTarPerm modified mode [ 'nan_object_wrap.h', 436, 420 ]
241 silly gunzTarPerm extractEntry nan_persistent_12_inl.h
242 silly gunzTarPerm modified mode [ 'nan_persistent_12_inl.h', 436, 420 ]
243 silly gunzTarPerm extractEntry nan_persistent_pre_12_inl.h
244 silly gunzTarPerm modified mode [ 'nan_persistent_pre_12_inl.h', 436, 420 ]
245 silly gunzTarPerm extractEntry nan_string_bytes.h
246 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 420 ]
247 silly gunzTarPerm extractEntry nan_typedarray_contents.h
248 silly gunzTarPerm modified mode [ 'nan_typedarray_contents.h', 436, 420 ]
249 silly gunzTarPerm extractEntry nan_weak.h
250 silly gunzTarPerm modified mode [ 'nan_weak.h', 436, 420 ]
251 silly gunzTarPerm extractEntry CHANGELOG.md
252 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 420 ]
253 silly gunzTarPerm extractEntry tools/package.json
254 silly gunzTarPerm modified mode [ 'tools/package.json', 436, 420 ]
255 silly gunzTarPerm extractEntry tools/README.md
256 silly gunzTarPerm modified mode [ 'tools/README.md', 436, 420 ]
257 silly gunzTarPerm extractEntry tools/1to2.js
258 silly gunzTarPerm modified mode [ 'tools/1to2.js', 509, 493 ]
259 verbose write writing to /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan/package.json
260 info preinstall [email protected]
261 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan/package.json
262 verbose readDependencies loading dependencies from /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan/package.json
263 silly install resolved []
264 verbose about to build /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
265 info build /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
266 info linkStuff [email protected]
267 silly linkStuff [email protected] has /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules as its parent node_modules
268 verbose linkBins [email protected]
269 verbose linkMans [email protected]
270 verbose rebuildBundles [email protected]
271 info install [email protected]
272 info postinstall [email protected]
273 verbose unlock done using /Users/OliverJAsh/.npm/_locks/nan-8bf48f1d5f8f5ca3.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak/node_modules/nan
274 verbose about to build /Users/OliverJAsh/Development/frontend/node_modules/weak
275 info build /Users/OliverJAsh/Development/frontend/node_modules/weak
276 info linkStuff [email protected]
277 silly linkStuff [email protected] has /Users/OliverJAsh/Development/frontend/node_modules as its parent node_modules
278 verbose linkBins [email protected]
279 verbose linkMans [email protected]
280 verbose rebuildBundles [email protected]
281 verbose rebuildBundles [ 'bindings', 'nan' ]
282 info install [email protected]
283 verbose unsafe-perm in lifecycle true
284 info [email protected] Failed to exec install script
285 verbose unlock done using /Users/OliverJAsh/.npm/_locks/weak-450619083d6d2a46.lock for /Users/OliverJAsh/Development/frontend/node_modules/weak
286 verbose stack Error: [email protected] install: `node-gyp rebuild`
286 verbose stack Exit status 1
286 verbose stack     at EventEmitter.<anonymous> (/Users/OliverJAsh/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
286 verbose stack     at EventEmitter.emit (events.js:110:17)
286 verbose stack     at ChildProcess.<anonymous> (/Users/OliverJAsh/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/spawn.js:24:14)
286 verbose stack     at ChildProcess.emit (events.js:110:17)
286 verbose stack     at maybeClose (child_process.js:1015:16)
286 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
287 verbose pkgid [email protected]
288 verbose cwd /Users/OliverJAsh/Development/frontend
289 error Darwin 15.0.0
290 error argv "/Users/OliverJAsh/.nvm/versions/node/v0.12.7/bin/node" "/Users/OliverJAsh/.nvm/versions/node/v0.12.7/bin/npm" "i" "weak"
291 error node v0.12.7
292 error npm  v2.11.3
293 error code ELIFECYCLE
294 error [email protected] install: `node-gyp rebuild`
294 error Exit status 1
295 error Failed at the [email protected] install script 'node-gyp rebuild'.
295 error This is most likely a problem with the weak package,
295 error not with npm itself.
295 error Tell the author that this fails on your system:
295 error     node-gyp rebuild
295 error You can get their info via:
295 error     npm owner ls weak
295 error There is likely additional logging output above.
296 verbose exit [ 1, true ]
297 verbose unbuild node_modules/weak
298 info preuninstall [email protected]
299 info uninstall [email protected]
300 verbose unbuild rmStuff [email protected] from /Users/OliverJAsh/Development/frontend/node_modules
301 info postuninstall [email protected]
302 silly gentlyRm /Users/OliverJAsh/Development/frontend/node_modules/weak is being purged from base /Users/OliverJAsh/Development/frontend
303 verbose gentlyRm don't care about contents; nuking /Users/OliverJAsh/Development/frontend/node_modules/weak
304 silly vacuum-fs purging /Users/OliverJAsh/Development/frontend/node_modules/weak
305 silly vacuum-fs removing /Users/OliverJAsh/Development/frontend/node_modules
306 silly vacuum-fs finished vacuuming up to /Users/OliverJAsh/Development/frontend

node-weak stops the incremental gc from collecting referenced objects

Objects that were wrapped in a weak() call (even without a callback) are never collected by the incremental gc and are only collected by a full gc run. This changes the behavior of the garbage collector (in regards to the watched object) and delays the time when the watched object is deleted.

  1. It's not possible to use node-weak to get notified immediately when the object should have been destroyed originally (when it was destroyed without using node-weak). It's not possible to get any information if the object should have been collected by the incremental or full gc only (to check if the object was collectable by the incremental gc or not).
  2. It slows things down a bit, because this makes full gc runs longer and happen more often.

Can something be done with the above or is it impossible due to v8 limitations?

error in conjunction with phantomjs

I am not sure if this is the right repository to post this or if this maybe should better go into the official phantomjs-node repository. I'm getting some wierd errors with 0.11.x which don't happen with stable versions of node.

with node 0.11.10

node: symbol lookup error: .../phantom/node_modules/dnode/node_modules/weak/build/Release/weakref.node: undefined symbol: _ZN2v814ObjectTemplate25SetIndexedPropertyHandlerEPFvjRKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvjNS_5LocalIS2_EES5_EPFvjRKNS1_INS_7IntegerEEEEPFvjRKNS1_INS_7BooleanEEEEPFvRKNS1_INS_5ArrayEEEENS_6HandleIS2_EE

with node 0.11.12

.../phantom/node_modules/dnode/node_modules/weak/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module did not self-register.
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Module.require (module.js:357:17)
    at require (module.js:373:17)
    at bindings (.../phantom/node_modules/dnode/node_modules/weak/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (.../phantom/node_modules/dnode/node_modules/weak/lib/weak.js:7:35)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)

I am running on linux ubuntu

Do you maybe have a clue why this error happens?

best practices example in readme

HI there, I've been monitoring memory usage with

top -pid `pgrep -n node`

I've found that if the callback function passed as the second argument closes over another variable it's better to use the pattern:

var obj1;
weak(obj2, function x () {
  use(obj1);
  x = null;
});

Than it is to do:

var obj1;
function x () {
  use(obj1);
};
weak(obj2, x);

For my app, the first stabilizes around 722 MB of memory, while the second stabilizes at 1.8 GB. Not sure why/if this is useful.

A question about weak()'s return value

The documentation says that the return value from weak(o) is an object that proxies all of o's properties and methods, so it seams I should be able to pass that around instead of 'o'. However, it doesn't look like it has o's prototype chain, which means it isn't a fully transparent replacement for o.

Is that true? And if so, is it by design, or is that something that can be fixed/added?

Should have separate enumerator for property names vs. property indices

During initialization of weakref, SetIndexedPropertyHandler() sets the same enumerator i.e. WeakPropertyEnumerator which is also set in SetNamedPropertyHandler(). If we have an code:

var obj = {a : 'a'};
var x = weak(obj);
console.log(x); 

The last line prints 'a' twice -- once each extracted using SetindexedPropertyHandler and SetNamedPropertyHandler using same WeakPropertyEnumerator.
Having a separate enumerator for indexed properties would help in not extracting named properties from object.

Problem installing node-weak on Windows7

I can't seem to load node-weak on Windows7. I've tried Python 2.7, 2.5, 2.3, to no avail. It seems (from the error below), that I need to use a version of Python2, but changing versions doesn't seem to help. Any help is appreciated.

C:\project1>npm install weak
npm http GET https://registry.npmjs.org/weak
npm http 304 https://registry.npmjs.org/weak
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> [email protected] install C:\project1\node_modules\weak
> node-gyp rebuild


C:\project1\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\
bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! rebuild error Error: Python executable "c:\Python25\python.exe" is Pyth
on 3, which is not supported.
gyp ERR! rebuild error You can set the PYTHON env variable to point to a Python
2 interpreter.
gyp ERR! rebuild error     at failPython3 (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:90:14)
gyp ERR! rebuild error     at C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:79:9
gyp ERR! rebuild error     at ChildProcess.exithandler (child_process.js:534:7)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at maybeClose (child_process.js:634:16)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:676:5)
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `cmd "/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 weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak"
npm ERR! cwd C:\project1
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\project1\npm-debug.log
npm ERR! not ok code 0

Unable to install via npm on Windows

Here is the error message "npm install weak" gives me on windows.

npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing [email protected] `cmd "/c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\exec.js:49:20)
npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:70:17)
npm ERR! error installing [email protected]     at maybeExit (child_process.js:359:16)
npm ERR! error installing [email protected]     at Process.onexit (child_process.js:395:5)
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! `cmd "/c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the weak package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls weak
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak"
npm ERR! cwd c:\tmp\npmhooktest
npm ERR! node -v v0.6.4
npm ERR! npm -v 1.1.0-alpha-6
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! message `cmd "/c" "node-waf clean || true; node-waf configure build"` failed with 1

Weak installation failed

I'm installing Nightmare which installs weak, but I notice the installation failed. Tried to install it directly resulting the same error.

[email protected] install /Users/xxx/node_modules/weak
node-gyp rebuild

CXX(target) Release/obj.target/weakref/src/weakref.o
SOLINK_MODULE(target) Release/weakref.node

ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/weakref.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/idraki/.nvm/versions/node/v0.12.4/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "node" "/Users/idraki/.nvm/versions/node/v0.12.4/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xxx/node_modules/weak
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/xxx/.nvm/versions/node/v0.12.4/bin/node" "/Users/xxx/.nvm/versions/node/v0.12.4/bin/npm" "install" "weak"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the weak 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 weak
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/xxx/npm-debug.log

I'm running OSX El-Capitan

Linux invoke: npm install weak, failed. make: Nothing to be done for `all'.

Install weak:

[cczhong@xmubteam01 ~]$ npm install weak

[email protected] install /home/cczhong/node_modules/weak
node-gyp rebuild

make: Entering directory /home/cczhong/node_modules/weak/build' make: Nothing to be done forall'.
make: Leaving directory `/home/cczhong/node_modules/weak/build'
[email protected] node_modules/weak
ๅฟ–[email protected]
ๅฟ–[email protected]
[cczhong@xmubteam01 ~]$

boot project:
[cczhong@xmubteam01 ~]$ node firstApp2/
/home/cczhong/firstApp2
express-session deprecated undefined resave option; provide resave option firstApp2/app.js:24:9
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option firstApp2/app.js:24:9
available port at: 3001
try next port.
try next port.
try next port.
try next port.
available port at: 3002
try next port.
try next port.
try next port.
available port at: 3003
try next port.
try next port.
available port at: 3004
try next port.
available port at: 3005

/home/cczhong/node_modules/weak/node_modules/bindings/bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
?/home/cczhong/node_modules/weak/build/weakref.node
?/home/cczhong/node_modules/weak/build/Debug/weakref.node
?/home/cczhong/node_modules/weak/build/Release/weakref.node
?/home/cczhong/node_modules/weak/out/Debug/weakref.node
?/home/cczhong/node_modules/weak/Debug/weakref.node
?/home/cczhong/node_modules/weak/out/Release/weakref.node
?/home/cczhong/node_modules/weak/Release/weakref.node
?/home/cczhong/node_modules/weak/build/default/weakref.node
?/home/cczhong/node_modules/weak/compiled/0.10.31/linux/ia32/weakref.node
at bindings (/home/cczhong/node_modules/weak/node_modules/bindings/bindings.js:88:9)
at Object. (/home/cczhong/node_modules/weak/lib/weak.js:7:35)
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 new D (/home/cczhong/firstApp2/node_modules/phantom/node_modules/dnode/index.js:28:20)
at module.exports (/home/cczhong/firstApp2/node_modules/phantom/node_modules/dnode/index.js:8:12)
at /home/cczhong/firstApp2/node_modules/phantom/phantom.js:138:13
[cczhong@xmubteam01 ~]$

Will you help with this? Thanks!

Deprecation warnings

node v0.10.26 osx 10.9.2

> [email protected] install /Users/jnordberg/Development/x/node_modules/weak
> node-gyp rebuild

  CXX(target) Release/obj.target/weakref/src/weakref.o
../src/weakref.cc:153:3: warning: 'NanDispose' is deprecated [-Wdeprecated-declarations]
  NanDispose(cont->proxy);
  ^
../node_modules/nan/nan.h:612:48: note: 'NanDispose' declared here
  template<class T> static NAN_DEPRECATED(void NanDispose(
                                               ^
../node_modules/nan/nan.h:149:65: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED(declarator) __attribute__((deprecated)) declarator
                                                                ^
../src/weakref.cc:154:3: warning: 'NanDispose' is deprecated [-Wdeprecated-declarations]
  NanDispose(cont->target);
  ^
../node_modules/nan/nan.h:612:48: note: 'NanDispose' declared here
  template<class T> static NAN_DEPRECATED(void NanDispose(
                                               ^
../node_modules/nan/nan.h:149:65: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED(declarator) __attribute__((deprecated)) declarator
                                                                ^
../src/weakref.cc:155:3: warning: 'NanDispose' is deprecated [-Wdeprecated-declarations]
  NanDispose(cont->emitter);
  ^
../node_modules/nan/nan.h:612:48: note: 'NanDispose' declared here
  template<class T> static NAN_DEPRECATED(void NanDispose(
                                               ^
../node_modules/nan/nan.h:149:65: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED(declarator) __attribute__((deprecated)) declarator
                                                                ^
3 warnings generated.
  SOLINK_MODULE(target) Release/weakref.node
  SOLINK_MODULE(target) Release/weakref.node: Finished

Doesn't work on node 0.9

This may well be a node issue, but it looks like you're touching a V8 property that has moved or changed.

dyld: lazy symbol binding failed: Symbol not found: __ZN2v86Object27GetPointerFromInternalFieldEi
  Referenced from: /Users/isaacs/dev/js/lru-cache/node_modules/weak/build/Release/weakref.node
  Expected in: dynamic lookup

dyld: Symbol not found: __ZN2v86Object27GetPointerFromInternalFieldEi
  Referenced from: /Users/isaacs/dev/js/lru-cache/node_modules/weak/build/Release/weakref.node
  Expected in: dynamic lookup

Trace/BPT trap: 5

install from npm error

Hi Nate,

got error when try to install through npm.

attached the full log.

we are being firewall and proxy but most of the other library just works fine.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'weak' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of C:\Users\kpwu\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\package.json
6 silly cache add args [ 'weak', null ]
7 verbose cache add spec weak
8 silly cache add parsed spec Result {
8 silly cache add   raw: 'weak',
8 silly cache add   scope: null,
8 silly cache add   name: 'weak',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: '*',
8 silly cache add   type: 'range' }
9 silly addNamed weak@*
10 verbose addNamed "*" is a valid semver range for weak
11 silly addNameRange { name: 'weak', range: '*', hasData: false }
12 silly mapToRegistry name weak
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/weak
16 verbose addNameRange registry:https://registry.npmjs.org/weak not in flight; fetching
17 verbose request uri https://registry.npmjs.org/weak
18 verbose request no auth needed
19 info attempt registry request try #1 at 3:58:46 PM
20 verbose request id 94ac24f33ec445f8
21 verbose etag "C06FCHTAD0V9QYUWNPXAFG5K6"
22 http request GET https://registry.npmjs.org/weak
23 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
24 info attempt registry request try #2 at 3:58:57 PM
25 verbose etag "C06FCHTAD0V9QYUWNPXAFG5K6"
26 http request GET https://registry.npmjs.org/weak
27 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
28 info attempt registry request try #3 at 3:59:57 PM
29 verbose etag "C06FCHTAD0V9QYUWNPXAFG5K6"
30 http request GET https://registry.npmjs.org/weak
31 silly get cb [ 304, undefined ]
32 verbose etag https://registry.npmjs.org/weak from cache
33 verbose get saving weak to C:\Users\kpwu\AppData\Roaming\npm-cache\registry.npmjs.org\weak\.cache.json
34 silly addNameRange number 2 { name: 'weak', range: '*', hasData: true }
35 silly addNameRange versions [ 'weak',
35 silly addNameRange   [ '0.0.1',
35 silly addNameRange     '0.1.0',
35 silly addNameRange     '0.1.1',
35 silly addNameRange     '0.1.2',
35 silly addNameRange     '0.1.3',
35 silly addNameRange     '0.1.4',
35 silly addNameRange     '0.1.5',
35 silly addNameRange     '0.2.0',
35 silly addNameRange     '0.2.1',
35 silly addNameRange     '0.2.2',
35 silly addNameRange     '0.3.0',
35 silly addNameRange     '0.3.1',
35 silly addNameRange     '0.3.2',
35 silly addNameRange     '0.3.3',
35 silly addNameRange     '0.3.4',
35 silly addNameRange     '0.4.0',
35 silly addNameRange     '0.4.1',
35 silly addNameRange     '1.0.0' ] ]
36 silly addNamed [email protected]
37 verbose addNamed "1.0.0" is a plain semver version for weak
38 silly cache afterAdd [email protected]
39 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\weak\1.0.0\package\package.json not in flight; writing
40 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\weak\1.0.0\package\package.json written
41 silly install resolved [ { author: { name: 'Ben Noordhuis', email: '[email protected]' },
41 silly install resolved     contributors: [ [Object] ],
41 silly install resolved     name: 'weak',
41 silly install resolved     license: 'MIT',
41 silly install resolved     description: 'Make weak references to JavaScript Objects.',
41 silly install resolved     keywords:
41 silly install resolved      [ 'weak',
41 silly install resolved        'reference',
41 silly install resolved        'js',
41 silly install resolved        'javascript',
41 silly install resolved        'object',
41 silly install resolved        'function',
41 silly install resolved        'callback' ],
41 silly install resolved     version: '1.0.0',
41 silly install resolved     repository:
41 silly install resolved      { type: 'git',
41 silly install resolved        url: 'git://github.com/TooTallNate/node-weak.git' },
41 silly install resolved     main: 'lib/weak.js',
41 silly install resolved     scripts:
41 silly install resolved      { test: 'mocha -gc --reporter spec',
41 silly install resolved        install: 'node-gyp rebuild' },
41 silly install resolved     dependencies: { bindings: '^1.2.1', nan: '^2.0.5' },
41 silly install resolved     devDependencies: { mocha: '~2.1.0' },
41 silly install resolved     gypfile: true,
41 silly install resolved     gitHead: '780164bf6d5dbc00841b05e6d888eba3ca9e9bdd',
41 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-weak/issues' },
41 silly install resolved     homepage: 'https://github.com/TooTallNate/node-weak#readme',
41 silly install resolved     _id: '[email protected]',
41 silly install resolved     _shasum: '3f2c2929e0a6963bf85a88f84782a8c0bfe10006',
41 silly install resolved     _from: 'weak@*',
41 silly install resolved     _npmVersion: '2.13.3',
41 silly install resolved     _nodeVersion: '3.0.0',
41 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
41 silly install resolved     maintainers: [ [Object], [Object] ],
41 silly install resolved     dist:
41 silly install resolved      { shasum: '3f2c2929e0a6963bf85a88f84782a8c0bfe10006',
41 silly install resolved        tarball: 'http://registry.npmjs.org/weak/-/weak-1.0.0.tgz' },
41 silly install resolved     directories: {},
41 silly install resolved     _resolved: 'https://registry.npmjs.org/weak/-/weak-1.0.0.tgz',
41 silly install resolved     readme: 'ERROR: No README data found!' } ]
42 info install [email protected] into C:\Users\kpwu\AppData\Roaming\npm
43 info installOne [email protected]
44 verbose installOne of weak to C:\Users\kpwu\AppData\Roaming\npm not in flight; installing
45 verbose lock using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\weak-4f4551b70a924cc7.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
46 silly install write writing weak 1.0.0 to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
47 verbose unbuild node_modules\weak
48 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak is being purged from base C:\Users\kpwu\AppData\Roaming\npm
49 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
50 verbose tar unpack C:\Users\kpwu\AppData\Roaming\npm-cache\weak\1.0.0\package.tgz
51 verbose tar unpacking to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
52 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak is being purged
53 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
54 silly gunzTarPerm modes [ '777', '666' ]
55 silly gunzTarPerm extractEntry package.json
56 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ]
57 silly gunzTarPerm extractEntry .npmignore
58 silly gunzTarPerm modified mode [ '.npmignore', 420, 438 ]
59 silly gunzTarPerm extractEntry README.md
60 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ]
61 silly gunzTarPerm extractEntry LICENSE
62 silly gunzTarPerm modified mode [ 'LICENSE', 420, 438 ]
63 silly gunzTarPerm extractEntry binding.gyp
64 silly gunzTarPerm modified mode [ 'binding.gyp', 420, 438 ]
65 silly gunzTarPerm extractEntry .travis.yml
66 silly gunzTarPerm modified mode [ '.travis.yml', 420, 438 ]
67 silly gunzTarPerm extractEntry appveyor.yml
68 silly gunzTarPerm modified mode [ 'appveyor.yml', 420, 438 ]
69 silly gunzTarPerm extractEntry History.md
70 silly gunzTarPerm modified mode [ 'History.md', 420, 438 ]
71 silly gunzTarPerm extractEntry lib/weak.js
72 silly gunzTarPerm modified mode [ 'lib/weak.js', 420, 438 ]
73 silly gunzTarPerm extractEntry src/weakref.cc
74 silly gunzTarPerm modified mode [ 'src/weakref.cc', 420, 438 ]
75 silly gunzTarPerm extractEntry test/buffer.js
76 silly gunzTarPerm modified mode [ 'test/buffer.js', 420, 438 ]
77 silly gunzTarPerm extractEntry test/callback.js
78 silly gunzTarPerm modified mode [ 'test/callback.js', 420, 438 ]
79 silly gunzTarPerm extractEntry test/create.js
80 silly gunzTarPerm modified mode [ 'test/create.js', 420, 438 ]
81 silly gunzTarPerm extractEntry test/exports.js
82 silly gunzTarPerm modified mode [ 'test/exports.js', 420, 438 ]
83 silly gunzTarPerm extractEntry test/weakref.js
84 silly gunzTarPerm modified mode [ 'test/weakref.js', 420, 438 ]
85 verbose write writing to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\package.json
86 info preinstall [email protected]
87 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\package.json
88 silly prepareForInstallMany adding bindings@^1.2.1 from weak dependencies
89 silly prepareForInstallMany adding nan@^2.0.5 from weak dependencies
90 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\package.json
91 silly cache add args [ 'bindings@^1.2.1', null ]
92 verbose cache add spec bindings@^1.2.1
93 silly cache add args [ 'nan@^2.0.5', null ]
94 verbose cache add spec nan@^2.0.5
95 silly cache add parsed spec Result {
95 silly cache add   raw: 'bindings@^1.2.1',
95 silly cache add   scope: null,
95 silly cache add   name: 'bindings',
95 silly cache add   rawSpec: '^1.2.1',
95 silly cache add   spec: '>=1.2.1 <2.0.0',
95 silly cache add   type: 'range' }
96 silly addNamed bindings@>=1.2.1 <2.0.0
97 verbose addNamed ">=1.2.1 <2.0.0" is a valid semver range for bindings
98 silly addNameRange { name: 'bindings', range: '>=1.2.1 <2.0.0', hasData: false }
99 silly mapToRegistry name bindings
100 silly mapToRegistry using default registry
101 silly mapToRegistry registry https://registry.npmjs.org/
102 silly mapToRegistry uri https://registry.npmjs.org/bindings
103 verbose addNameRange registry:https://registry.npmjs.org/bindings not in flight; fetching
104 silly cache add parsed spec Result {
104 silly cache add   raw: 'nan@^2.0.5',
104 silly cache add   scope: null,
104 silly cache add   name: 'nan',
104 silly cache add   rawSpec: '^2.0.5',
104 silly cache add   spec: '>=2.0.5 <3.0.0',
104 silly cache add   type: 'range' }
105 silly addNamed nan@>=2.0.5 <3.0.0
106 verbose addNamed ">=2.0.5 <3.0.0" is a valid semver range for nan
107 silly addNameRange { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: false }
108 silly mapToRegistry name nan
109 silly mapToRegistry using default registry
110 silly mapToRegistry registry https://registry.npmjs.org/
111 silly mapToRegistry uri https://registry.npmjs.org/nan
112 verbose addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
113 verbose request uri https://registry.npmjs.org/bindings
114 verbose request no auth needed
115 info attempt registry request try #1 at 3:59:57 PM
116 verbose etag "547Q3C60W4DUGPOZ65YOO6930"
117 http request GET https://registry.npmjs.org/bindings
118 verbose request uri https://registry.npmjs.org/nan
119 verbose request no auth needed
120 info attempt registry request try #1 at 3:59:57 PM
121 verbose etag "EEJEYBDBWDA07LWTXUI68JUWL"
122 http request GET https://registry.npmjs.org/nan
123 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
124 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
125 info attempt registry request try #2 at 4:00:07 PM
126 verbose etag "547Q3C60W4DUGPOZ65YOO6930"
127 http request GET https://registry.npmjs.org/bindings
128 info attempt registry request try #2 at 4:00:07 PM
129 verbose etag "EEJEYBDBWDA07LWTXUI68JUWL"
130 http request GET https://registry.npmjs.org/nan
131 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
132 info retry will retry, error on last attempt: Error: unable to get local issuer certificate
133 info attempt registry request try #3 at 4:01:07 PM
134 verbose etag "547Q3C60W4DUGPOZ65YOO6930"
135 http request GET https://registry.npmjs.org/bindings
136 info attempt registry request try #3 at 4:01:07 PM
137 verbose etag "EEJEYBDBWDA07LWTXUI68JUWL"
138 http request GET https://registry.npmjs.org/nan
139 silly get cb [ 304, undefined ]
140 verbose etag https://registry.npmjs.org/nan from cache
141 verbose get saving nan to C:\Users\kpwu\AppData\Roaming\npm-cache\registry.npmjs.org\nan\.cache.json
142 silly addNameRange number 2 { name: 'nan', range: '>=2.0.5 <3.0.0', hasData: true }
143 silly addNameRange versions [ 'nan',
143 silly addNameRange   [ '0.3.0-wip',
143 silly addNameRange     '0.3.0-wip2',
143 silly addNameRange     '0.3.0',
143 silly addNameRange     '0.3.1',
143 silly addNameRange     '0.3.2',
143 silly addNameRange     '0.4.0',
143 silly addNameRange     '0.4.1',
143 silly addNameRange     '0.4.2',
143 silly addNameRange     '0.4.3',
143 silly addNameRange     '0.4.4',
143 silly addNameRange     '0.5.0',
143 silly addNameRange     '0.5.1',
143 silly addNameRange     '0.5.2',
143 silly addNameRange     '0.6.0',
143 silly addNameRange     '0.7.0',
143 silly addNameRange     '0.7.1',
143 silly addNameRange     '0.8.0',
143 silly addNameRange     '1.0.0',
143 silly addNameRange     '1.1.0',
143 silly addNameRange     '1.1.1',
143 silly addNameRange     '1.1.2',
143 silly addNameRange     '1.2.0',
143 silly addNameRange     '1.3.0',
143 silly addNameRange     '1.4.0',
143 silly addNameRange     '1.4.1',
143 silly addNameRange     '1.5.0',
143 silly addNameRange     '1.4.2',
143 silly addNameRange     '1.4.3',
143 silly addNameRange     '1.5.1',
143 silly addNameRange     '1.5.2',
143 silly addNameRange     '1.6.0',
143 silly addNameRange     '1.5.3',
143 silly addNameRange     '1.6.1',
143 silly addNameRange     '1.6.2',
143 silly addNameRange     '1.7.0',
143 silly addNameRange     '1.8.0',
143 silly addNameRange     '1.8.1',
143 silly addNameRange     '1.8.2',
143 silly addNameRange     '1.8.3',
143 silly addNameRange     '1.8.4',
143 silly addNameRange     '1.9.0',
143 silly addNameRange     '2.0.0',
143 silly addNameRange     '2.0.1',
143 silly addNameRange     '2.0.2',
143 silly addNameRange     '2.0.3',
143 silly addNameRange     '2.0.4',
143 silly addNameRange     '2.0.5',
143 silly addNameRange     '2.0.6',
143 silly addNameRange     '2.0.7',
143 silly addNameRange     '2.0.8',
143 silly addNameRange     '2.0.9',
143 silly addNameRange     '2.1.0' ] ]
144 silly addNamed [email protected]
145 verbose addNamed "2.1.0" is a plain semver version for nan
146 silly get cb [ 304, undefined ]
147 verbose etag https://registry.npmjs.org/bindings from cache
148 verbose get saving bindings to C:\Users\kpwu\AppData\Roaming\npm-cache\registry.npmjs.org\bindings\.cache.json
149 silly cache afterAdd [email protected]
150 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\nan\2.1.0\package\package.json not in flight; writing
151 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\nan\2.1.0\package\package.json written
152 silly addNameRange number 2 { name: 'bindings', range: '>=1.2.1 <2.0.0', hasData: true }
153 silly addNameRange versions [ 'bindings',
153 silly addNameRange   [ '0.0.1',
153 silly addNameRange     '0.1.0',
153 silly addNameRange     '0.1.1',
153 silly addNameRange     '0.2.0',
153 silly addNameRange     '0.2.1',
153 silly addNameRange     '0.2.2',
153 silly addNameRange     '0.2.3',
153 silly addNameRange     '0.2.4',
153 silly addNameRange     '0.3.0',
153 silly addNameRange     '0.4.0',
153 silly addNameRange     '1.0.0',
153 silly addNameRange     '1.1.0',
153 silly addNameRange     '1.1.1',
153 silly addNameRange     '1.2.0',
153 silly addNameRange     '1.2.1' ] ]
154 silly addNamed [email protected]
155 verbose addNamed "1.2.1" is a plain semver version for bindings
156 silly cache afterAdd [email protected]
157 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\bindings\1.2.1\package\package.json not in flight; writing
158 verbose afterAdd C:\Users\kpwu\AppData\Roaming\npm-cache\bindings\1.2.1\package\package.json written
159 silly install resolved [ { name: 'nan',
159 silly install resolved     version: '2.1.0',
159 silly install resolved     description: 'Native Abstractions for Node.js: C++ header for Node 0.8 -> 4 compatibility',
159 silly install resolved     main: 'include_dirs.js',
159 silly install resolved     repository: { type: 'git', url: 'git://github.com/nodejs/nan.git' },
159 silly install resolved     scripts:
159 silly install resolved      { test: 'tap --gc test/js/*-test.js',
159 silly install resolved        'rebuild-tests': 'node-gyp rebuild --msvs_version=2013 --directory test',
159 silly install resolved        docs: 'doc/.build.sh' },
159 silly install resolved     contributors:
159 silly install resolved      [ [Object],
159 silly install resolved        [Object],
159 silly install resolved        [Object],
159 silly install resolved        [Object],
159 silly install resolved        [Object],
159 silly install resolved        [Object],
159 silly install resolved        [Object] ],
159 silly install resolved     devDependencies:
159 silly install resolved      { bindings: '~1.2.1',
159 silly install resolved        commander: '^2.8.1',
159 silly install resolved        glob: '^5.0.14',
159 silly install resolved        'node-gyp': '~3.0.1',
159 silly install resolved        tap: '~0.7.1',
159 silly install resolved        xtend: '~4.0.0' },
159 silly install resolved     license: 'MIT',
159 silly install resolved     bugs: { url: 'https://github.com/nodejs/nan/issues' },
159 silly install resolved     homepage: 'https://github.com/nodejs/nan#readme',
159 silly install resolved     _id: '[email protected]',
159 silly install resolved     _shasum: '020a7ccedc63fdee85f85967d5607849e74abbe8',
159 silly install resolved     _resolved: 'https://registry.npmjs.org/nan/-/nan-2.1.0.tgz',
159 silly install resolved     _from: 'nan@>=2.0.5 <3.0.0',
159 silly install resolved     _npmVersion: '3.3.5',
159 silly install resolved     _nodeVersion: '4.1.2',
159 silly install resolved     _npmUser: { name: 'kkoopa', email: '[email protected]' },
159 silly install resolved     dist:
159 silly install resolved      { shasum: '020a7ccedc63fdee85f85967d5607849e74abbe8',
159 silly install resolved        tarball: 'http://registry.npmjs.org/nan/-/nan-2.1.0.tgz' },
159 silly install resolved     maintainers: [ [Object], [Object] ],
159 silly install resolved     directories: {},
159 silly install resolved     readme: 'ERROR: No README data found!' },
159 silly install resolved   { name: 'bindings',
159 silly install resolved     description: 'Helper module for loading your native module\'s .node file',
159 silly install resolved     keywords: [ 'native', 'addon', 'bindings', 'gyp', 'waf', 'c', 'c++' ],
159 silly install resolved     version: '1.2.1',
159 silly install resolved     author:
159 silly install resolved      { name: 'Nathan Rajlich',
159 silly install resolved        email: '[email protected]',
159 silly install resolved        url: 'http://tootallnate.net' },
159 silly install resolved     repository:
159 silly install resolved      { type: 'git',
159 silly install resolved        url: 'git://github.com/TooTallNate/node-bindings.git' },
159 silly install resolved     main: './bindings.js',
159 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-bindings/issues' },
159 silly install resolved     homepage: 'https://github.com/TooTallNate/node-bindings',
159 silly install resolved     license: 'MIT',
159 silly install resolved     gitHead: 'e404152ee27f8478ccbc7122ee051246e8e5ec02',
159 silly install resolved     _id: '[email protected]',
159 silly install resolved     scripts: {},
159 silly install resolved     _shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
159 silly install resolved     _from: 'bindings@>=1.2.1 <2.0.0',
159 silly install resolved     _npmVersion: '1.4.14',
159 silly install resolved     _npmUser: { name: 'tootallnate', email: '[email protected]' },
159 silly install resolved     maintainers: [ [Object], [Object] ],
159 silly install resolved     dist:
159 silly install resolved      { shasum: '14ad6113812d2d37d72e67b4cacb4bb726505f11',
159 silly install resolved        tarball: 'http://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz' },
159 silly install resolved     directories: {},
159 silly install resolved     _resolved: 'https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz',
159 silly install resolved     readme: 'ERROR: No README data found!' } ]
160 info install [email protected] into C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
161 info install [email protected] into C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
162 info installOne [email protected]
163 verbose installOne of nan to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak not in flight; installing
164 info installOne [email protected]
165 verbose installOne of bindings to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak not in flight; installing
166 verbose lock using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\nan-ac917b27354e259f.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
167 verbose lock using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\bindings-7b6c9f9535066726.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
168 silly install write writing nan 2.1.0 to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
169 silly install write writing bindings 1.2.1 to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
170 verbose unbuild node_modules\weak\node_modules\nan
171 verbose unbuild node_modules\weak\node_modules\bindings
172 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan is being purged from base C:\Users\kpwu\AppData\Roaming\npm
173 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
174 verbose tar unpack C:\Users\kpwu\AppData\Roaming\npm-cache\nan\2.1.0\package.tgz
175 verbose tar unpacking to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
176 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan is being purged
177 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
178 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings is being purged from base C:\Users\kpwu\AppData\Roaming\npm
179 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
180 silly gunzTarPerm modes [ '777', '666' ]
181 verbose tar unpack C:\Users\kpwu\AppData\Roaming\npm-cache\bindings\1.2.1\package.tgz
182 verbose tar unpacking to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
183 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings is being purged
184 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
185 silly gunzTarPerm modes [ '777', '666' ]
186 silly gunzTarPerm extractEntry package.json
187 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
188 silly gunzTarPerm extractEntry package.json
189 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ]
190 silly gunzTarPerm extractEntry README.md
191 silly gunzTarPerm modified mode [ 'README.md', 436, 438 ]
192 silly gunzTarPerm extractEntry include_dirs.js
193 silly gunzTarPerm modified mode [ 'include_dirs.js', 436, 438 ]
194 silly gunzTarPerm extractEntry README.md
195 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ]
196 silly gunzTarPerm extractEntry bindings.js
197 silly gunzTarPerm modified mode [ 'bindings.js', 420, 438 ]
198 silly gunzTarPerm extractEntry nan_converters.h
199 silly gunzTarPerm modified mode [ 'nan_converters.h', 436, 438 ]
200 silly gunzTarPerm extractEntry LICENSE.md
201 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 438 ]
202 silly gunzTarPerm extractEntry .dntrc
203 silly gunzTarPerm modified mode [ '.dntrc', 436, 438 ]
204 silly gunzTarPerm extractEntry appveyor.yml
205 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 438 ]
206 silly gunzTarPerm extractEntry doc/new.md
207 silly gunzTarPerm modified mode [ 'doc/new.md', 436, 438 ]
208 silly gunzTarPerm extractEntry doc/.build.sh
209 silly gunzTarPerm modified mode [ 'doc/.build.sh', 509, 511 ]
210 verbose write writing to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings\package.json
211 silly gunzTarPerm extractEntry doc/buffers.md
212 silly gunzTarPerm modified mode [ 'doc/buffers.md', 436, 438 ]
213 silly gunzTarPerm extractEntry doc/callback.md
214 silly gunzTarPerm modified mode [ 'doc/callback.md', 436, 438 ]
215 info preinstall [email protected]
216 silly gunzTarPerm extractEntry doc/converters.md
217 silly gunzTarPerm modified mode [ 'doc/converters.md', 436, 438 ]
218 silly gunzTarPerm extractEntry doc/errors.md
219 silly gunzTarPerm modified mode [ 'doc/errors.md', 436, 438 ]
220 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings\package.json
221 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings\package.json
222 silly gunzTarPerm extractEntry doc/maybe_types.md
223 silly gunzTarPerm modified mode [ 'doc/maybe_types.md', 436, 438 ]
224 silly gunzTarPerm extractEntry doc/methods.md
225 silly gunzTarPerm modified mode [ 'doc/methods.md', 436, 438 ]
226 silly install resolved []
227 verbose about to build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
228 info build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
229 info linkStuff [email protected]
230 silly linkStuff [email protected] has C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules as its parent node_modules
231 silly linkStuff [email protected] is part of a global install
232 silly linkStuff [email protected] is installed into a global node_modules
233 verbose linkBins [email protected]
234 verbose linkMans [email protected]
235 verbose rebuildBundles [email protected]
236 silly gunzTarPerm extractEntry doc/asyncworker.md
237 silly gunzTarPerm modified mode [ 'doc/asyncworker.md', 436, 438 ]
238 silly gunzTarPerm extractEntry doc/node_misc.md
239 silly gunzTarPerm modified mode [ 'doc/node_misc.md', 436, 438 ]
240 info install [email protected]
241 info postinstall [email protected]
242 verbose unlock done using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\bindings-7b6c9f9535066726.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\bindings
243 silly gunzTarPerm extractEntry doc/persistent.md
244 silly gunzTarPerm modified mode [ 'doc/persistent.md', 436, 438 ]
245 silly gunzTarPerm extractEntry doc/scopes.md
246 silly gunzTarPerm modified mode [ 'doc/scopes.md', 436, 438 ]
247 silly gunzTarPerm extractEntry doc/script.md
248 silly gunzTarPerm modified mode [ 'doc/script.md', 436, 438 ]
249 silly gunzTarPerm extractEntry doc/string_bytes.md
250 silly gunzTarPerm modified mode [ 'doc/string_bytes.md', 436, 438 ]
251 silly gunzTarPerm extractEntry doc/v8_internals.md
252 silly gunzTarPerm modified mode [ 'doc/v8_internals.md', 436, 438 ]
253 silly gunzTarPerm extractEntry doc/v8_misc.md
254 silly gunzTarPerm modified mode [ 'doc/v8_misc.md', 436, 438 ]
255 silly gunzTarPerm extractEntry nan.h
256 silly gunzTarPerm modified mode [ 'nan.h', 436, 438 ]
257 silly gunzTarPerm extractEntry nan_callbacks.h
258 silly gunzTarPerm modified mode [ 'nan_callbacks.h', 436, 438 ]
259 silly gunzTarPerm extractEntry nan_callbacks_12_inl.h
260 silly gunzTarPerm modified mode [ 'nan_callbacks_12_inl.h', 436, 438 ]
261 silly gunzTarPerm extractEntry nan_callbacks_pre_12_inl.h
262 silly gunzTarPerm modified mode [ 'nan_callbacks_pre_12_inl.h', 436, 438 ]
263 silly gunzTarPerm extractEntry nan_converters_43_inl.h
264 silly gunzTarPerm modified mode [ 'nan_converters_43_inl.h', 436, 438 ]
265 silly gunzTarPerm extractEntry nan_converters_pre_43_inl.h
266 silly gunzTarPerm modified mode [ 'nan_converters_pre_43_inl.h', 436, 438 ]
267 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
268 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 438 ]
269 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
270 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 438 ]
271 silly gunzTarPerm extractEntry nan_maybe_43_inl.h
272 silly gunzTarPerm modified mode [ 'nan_maybe_43_inl.h', 436, 438 ]
273 silly gunzTarPerm extractEntry nan_maybe_pre_43_inl.h
274 silly gunzTarPerm modified mode [ 'nan_maybe_pre_43_inl.h', 436, 438 ]
275 silly gunzTarPerm extractEntry nan_new.h
276 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 438 ]
277 silly gunzTarPerm extractEntry nan_object_wrap.h
278 silly gunzTarPerm modified mode [ 'nan_object_wrap.h', 436, 438 ]
279 silly gunzTarPerm extractEntry nan_persistent_12_inl.h
280 silly gunzTarPerm modified mode [ 'nan_persistent_12_inl.h', 436, 438 ]
281 silly gunzTarPerm extractEntry nan_persistent_pre_12_inl.h
282 silly gunzTarPerm modified mode [ 'nan_persistent_pre_12_inl.h', 436, 438 ]
283 silly gunzTarPerm extractEntry nan_string_bytes.h
284 silly gunzTarPerm modified mode [ 'nan_string_bytes.h', 436, 438 ]
285 silly gunzTarPerm extractEntry nan_typedarray_contents.h
286 silly gunzTarPerm modified mode [ 'nan_typedarray_contents.h', 436, 438 ]
287 silly gunzTarPerm extractEntry nan_weak.h
288 silly gunzTarPerm modified mode [ 'nan_weak.h', 436, 438 ]
289 silly gunzTarPerm extractEntry CHANGELOG.md
290 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 438 ]
291 silly gunzTarPerm extractEntry tools/package.json
292 silly gunzTarPerm modified mode [ 'tools/package.json', 436, 438 ]
293 silly gunzTarPerm extractEntry tools/README.md
294 silly gunzTarPerm modified mode [ 'tools/README.md', 436, 438 ]
295 silly gunzTarPerm extractEntry tools/1to2.js
296 silly gunzTarPerm modified mode [ 'tools/1to2.js', 509, 511 ]
297 verbose write writing to C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan\package.json
298 info preinstall [email protected]
299 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan\package.json
300 verbose readDependencies loading dependencies from C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan\package.json
301 silly install resolved []
302 verbose about to build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
303 info build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
304 info linkStuff [email protected]
305 silly linkStuff [email protected] has C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules as its parent node_modules
306 silly linkStuff [email protected] is part of a global install
307 silly linkStuff [email protected] is installed into a global node_modules
308 verbose linkBins [email protected]
309 verbose linkMans [email protected]
310 verbose rebuildBundles [email protected]
311 info install [email protected]
312 info postinstall [email protected]
313 verbose unlock done using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\nan-ac917b27354e259f.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak\node_modules\nan
314 verbose about to build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
315 info build C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
316 info linkStuff [email protected]
317 silly linkStuff [email protected] has C:\Users\kpwu\AppData\Roaming\npm\node_modules as its parent node_modules
318 silly linkStuff [email protected] is part of a global install
319 silly linkStuff [email protected] is installed into a global node_modules
320 silly linkStuff [email protected] is installed into the top-level global node_modules
321 verbose linkBins [email protected]
322 verbose linkMans [email protected]
323 verbose rebuildBundles [email protected]
324 verbose rebuildBundles [ 'bindings', 'nan' ]
325 info install [email protected]
326 verbose unsafe-perm in lifecycle true
327 info [email protected] Failed to exec install script
328 verbose unlock done using C:\Users\kpwu\AppData\Roaming\npm-cache\_locks\weak-4f4551b70a924cc7.lock for C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
329 verbose stack Error: [email protected] install: `node-gyp rebuild`
329 verbose stack Exit status 1
329 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
329 verbose stack     at emitTwo (events.js:87:13)
329 verbose stack     at EventEmitter.emit (events.js:172:7)
329 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
329 verbose stack     at emitTwo (events.js:87:13)
329 verbose stack     at ChildProcess.emit (events.js:172:7)
329 verbose stack     at maybeClose (internal/child_process.js:817:16)
329 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
330 verbose pkgid [email protected]
331 verbose cwd C:\Users\kpwu
332 error Windows_NT 6.1.7601
333 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "weak"
334 error node v4.0.0
335 error npm  v2.14.2
336 error code ELIFECYCLE
337 error [email protected] install: `node-gyp rebuild`
337 error Exit status 1
338 error Failed at the [email protected] install script 'node-gyp rebuild'.
338 error This is most likely a problem with the weak package,
338 error not with npm itself.
338 error Tell the author that this fails on your system:
338 error     node-gyp rebuild
338 error You can get their info via:
338 error     npm owner ls weak
338 error There is likely additional logging output above.
339 verbose exit [ 1, true ]
340 verbose unbuild node_modules\weak
341 info preuninstall [email protected]
342 info uninstall [email protected]
343 verbose unbuild rmStuff [email protected] from C:\Users\kpwu\AppData\Roaming\npm\node_modules
344 info postuninstall [email protected]
345 silly gentlyRm C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak is being purged from base C:\Users\kpwu\AppData\Roaming\npm
346 verbose gentlyRm don't care about contents; nuking C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
347 silly vacuum-fs purging C:\Users\kpwu\AppData\Roaming\npm\node_modules\weak
348 silly vacuum-fs quitting because other entries in C:\Users\kpwu\AppData\Roaming\npm\node_modules

Ken

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.