Repository navigation
Unable to build and run C++ addon in Windows 8.1 x64 #965
Description
Activity
Can you try using the npm / node-gyp that comes with io.js? The 'module did not self-register' error suggests that the module was built for the wrong version (probably node.js rather than io.js.)
I will try that soon. Currently I have both iojs and node uninstalled. I'll go get a sandwich, and then install iojs again. I'll try to use the versions of the tools that come with iojs and I'll report back how I get on.
No sandwich yet... but I've installed iojs, I think I am using the right tools, and ran into the same problem as before.
This time I went to the C:\Program Files\iojs directory and ran
npm install node-gyp -g. Maybe that is my problem as I may then be using the old (or current release) version of node-gyp to do the build. However, I don't know how to choose a specific node-gyp to use from the command line.@bnoordhuis When I run "node-gyp -v" from either the iojs or my project's C++ path I get v1.0.2.
As far as I know I'm not using the old version of node-gyp, but I don't know how to be sure about that. I don't know where to find the node-gyp that came with iojs.
@metabench v1.0.2 is the node-gyp version that ships with io.js. Can you tell what URL it downloads the source tarball from?
BTW, the node-gyp script itself is pretty well hidden, it's in npm's node_modules/node-gyp/bin directory.
@bnoordhuis I'd like to tell you that, but I don't know when it downloads a source tarball, or when I see the URL.
It should be in npm-debug.log somewhere. You may have to remove the cache first. It's in
$HOME/.node-gypon Unices. I believe it's%USERPROFILE%\\.node-gypon Windows.@bnoordhuis I could not see any .log files within my user profile's .node-gyp directory (I searched for *.log). I just see: {'directories': ['deps', 'ia32', 'Release', 'src', 'tools', x64], 'files': ['comon.gypi', 'installVersion']}
@bnoordhuis 'You may have to remove the cache first' - I don't know what cache you mean.
node-gyp downloads the source tarball from (if all is well) iojs.org but it caches it locally so it doesn't have to redownload it every time you build an add-on.
The npm-debug.log file is normally written to the directory you ran
npm install whateverin. If you run node-gyp directly, there will be no such file, everything will be logged to the console.@bnoordhuis Would that be the source tarball that node-gyp downloads when it installs?
@bnoordhuis I did not see it download a tarball after I installed iojs from the Windows installer. I do remember node-gyp had downloaded tarballs of node in the past though.
- addedc++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.and removedc++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.
on Feb 26, 2015 @bnoordhuis and all, I have solved the problem I was having.
There may have been a few things wrong with my setup here, I'm not sure which step got it to run. That said, I'll describe what I did.
Uninstall node
Uninstall iojs
Install iojs, with all options selected
Delete all files that had been built in my project
(verify that I can actually install and run C++ addons, using npm install binaryjs and npm install mmmagic, then loading them through the node terminal with require)
Go to my project's directory in the command prompt
run npm installI had been having problems because rather than doing npm install, I had been doing node-gyp configure, node-gyp build.
I think there still is an issue with iojs not easily running as a drop-in replacement for node while keeping exactly the same work-flow.
Do people agree there is still an issue here? I think the issue software-wise is far less severe than I had thought at first, but there is still a problem because something no longer works like it used to.
34 remaining items
- added a commit that references this issue
on Apr 24, 2015 - added 4 commits that reference this issue
on May 1, 2015 Closing, as the delay-load hook is enabled by default in io.js 2.0.0, please report back if this is still an issue.
- added a commit that references this issue
on May 8, 2015 - added a commit that references this issue
on May 22, 2015
I'm trying to use iojs 1.3.0 (Windows 8.1 x64), with a module written using nan, with nan 1.6.2 installed. It worked fine in node 0.12.0.
First I had problems with node-gyp looking for node.lib rather than iojs.lib. I got round that using pangyp.
When I tried running the JavaScript that references the addon, I got
Error: Module did not self-register.I've found a reference to a similar seeming issue with node-sass here: sass/node-sass#708