Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another one failing to install #754

Closed
Doidel opened this issue May 30, 2013 · 22 comments
Closed

Another one failing to install #754

Doidel opened this issue May 30, 2013 · 22 comments

Comments

@Doidel
Copy link

Doidel commented May 30, 2013

Greetings

I'm trying to install webworker-threads, a node addon that requires gyp. I followed the gyp instructions for setup, so far I'm still getting an error when trying to "rebuild":

C:\Program Files\nodejs\node_modules\webworker-threads>node "C:\Program Files\no
dejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp
.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\webworker-threads
gyp ERR! node -v v0.10.8
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0

I'm on a Windows 7 32 bit system.
Sooo to spare some time here's my personal checklist:

  • Paths: node is in both user and system path. npm is in user path. Python path is set too.
  • Python: 2.7.3 installed at C:\Python27
  • VisualStudio C++ 2010 AND 2012 Express installed
  • node version v0.10.8
  • ran everything with administrator privileges
  • Commands executed:
    npm install -g node-gyp
    npm install webworker-threads

Then the error appears.

Do you guys by any chance notice something I'm doing wrong?

Thanks a lot in advance for your guidance!
Doidel

@Subash
Copy link

Subash commented May 30, 2013

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Thanks for the answer sbspk. I've installed it, yet no matter what I do, e.g. when I try to run

nw-gyp configure --target=0.5.2

or build my addon or anything I always get the exact same error.
Does webworker-threads use node-webkit, or why do I actually have to use nw-gyp? (I think it does not). I haven't understood the reason to use it from the docs.

Thanks again for the help!

@Subash
Copy link

Subash commented May 30, 2013

nw-gyp configure --target=0.5.1

Current version of node-webkit is 0.5.1

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Ok, same issue though...
Someone had a similar error before: #568
So I double checked my Paths:
User:.....;C:\Users\Roman\AppData\Roaming\npm;C:\Program Files\nodejs
System:.....;C:\Program Files\nodejs;...

@Subash
Copy link

Subash commented May 30, 2013

Have you looked at the solution of #568

@Doidel
Copy link
Author

Doidel commented May 30, 2013

The C-Block? I don't even get to run configure, that'd be a problem way later in the chain than where I'm currently stuck at. Or what do you refer to?

@Doidel
Copy link
Author

Doidel commented May 30, 2013

I can try to install another package and see if that works, if that helps.. Would you have a random one at hand? if not I'll just try the hello world from the main page

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Ok I tried with the hello world addon - I get the exact same error. Must be something "global" then

(I as well tried with the extern "C" block)

@Doidel
Copy link
Author

Doidel commented May 30, 2013

The guys from nodejs/node-v0.x-archive#4674 seemed to have a similar issue back then. Yet it was fixed with node v 0.10.1 and I currently have 0.10.8 on my system..

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Well I got a liiiiiiittle bit further. I folloed the tutorial on http://www.c-sharpcorner.com/uploadfile/rmcochran/running-the-command-prompt-from-visual-studio-tools-menu/ to execute the gyp commands within a VS execution environment. I am able to build now, but no matter what I build (even the helloworld example) I get the following error when trying to implement/use the .node file:

module.js:356
Module._extensions[extension](this, filename);

Error: no error

@Mithgol
Copy link
Contributor

Mithgol commented May 30, 2013

Try uninstalling Node, then installing Node (and npm) to some other directory (not to C:\Program Files\nodejs). Otherwise Windows 7 and 8 (treating C:\Program Files\ specially) may attempt to masquerade some paths if a program is not privileged.

Do not npm install -g node-gyp (because npm already contains node-gyp), but repeat the npm install nw-gyp -g step before attempting npm install webworker-threads.

Tell us if it helps. Or not.

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Thanks for the answer!
I've tried so, my nodejs is now at C:/nodejs (which shouldn't provide any problems).
When I try "npm install webworker-threads" though (wich a privileged cmd) I get the wellknown error about the platform toolset:

C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: The Plattformtoolset (v110) is not installed or invalid. Make sure... [C:\nodejs\node_modules\webworker-threads\build\WebWorkerThreads.vcxproj]

btw it seems that the latter happens when I work with node-gyp while there's no error when using nw-gyp

Oh and about the Error: no error, I've also did some checks like the DLL headers, couldn't find anything suspicious...

@Mithgol
Copy link
Contributor

Mithgol commented May 30, 2013

If npm install webworker-threads fails but then you do not have any trouble running nw-gyp rebuild --target=0.5.1 in a privileged cmd inside webworker-threads' directory, that means you are probably getting the desired module built. (If there's no error and you have the .node file generated.)

After all, npm install modulename is running here only to check the code out of npm's package. (Whatever npm then tries to build with node-gyp is soon discarded by nw-gyp rebuilding anyway.)

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Well with nw-gyp I can do it, but when I try to run the modul I get the Error: no error. And with node-gyp I can't build it, then I get the upper error (platformtoolset)

@Mithgol
Copy link
Contributor

Mithgol commented May 30, 2013

Where exactly do you get the Error: no error message? In the node-webkit's console inside its “Developer tools” window?

@Doidel
Copy link
Author

Doidel commented May 30, 2013

When I run a test script from the cmd which uses the newly built module. Here's a screenshot for clarification:
http://postimg.org/image/86vrpxsbr/

@Mithgol
Copy link
Contributor

Mithgol commented May 30, 2013

Then that's an expected behaviour.

You cannot run a module built with nw-gyp in Node, and for the same reason a module built with node-gyp cannot run in node-webkit. These two engines have different ABI and thus the corresponding build tool is necessary for each (node-gyp if the module is to be run in Node, and nw-gyp if the module is to be run in node-webkit).

@Doidel
Copy link
Author

Doidel commented May 30, 2013

aaah I didn't get that. I guess I need Node, since webworker-threads doesn't seem to use node webkit. Ok so the problem that remains is the platformtoolset issue.
It's late over here, I'll try to find a solution tomorrow.
Many many thanks for clarifying and helping!

@Mithgol
Copy link
Contributor

Mithgol commented May 30, 2013

Look, maybe you didn't need the https://github.com/audreyt/node-webworker-threads module in the first place. In node-webkit you have an option to use real Web Workers (as in any other web browser) as long as you do not use Node.js API in your worker's code (that would make you encounter issue #494 which is not fixed).

And if you happen to have found out that your problem is not node-webkit-related at all (which is also possible), then you may close this issue (#754).

@Doidel
Copy link
Author

Doidel commented May 30, 2013

Ah is that so? I've read at the very beginning in one or two places that Web Workers aren't yet supported in node-webkit, that's why I started to look for an alternative in the first place. I'll try it out tomorrow - and close the issue if it all works! Many thanks!

@Doidel
Copy link
Author

Doidel commented May 31, 2013

Ok I think I got it now: What I want is to use is a WebWorker API for node.js on the server side (not the client side, not in the browser). Therefore I can't use node-webkit and I have to find another solution, e.g. like the node-webworker-threads. Correct me if I'm wrong, otherwise you may close the issue. Thanks again for all the support!

@Mithgol
Copy link
Contributor

Mithgol commented Jun 2, 2013

You haven't told us any general details about the task you're gong to accomplish, and that's why no one would correct your choice of tools even if it's wrong. However, if you are sure that you need some server side tool (and only server), then Node.js would be better than node-webkit, because the GUI of the latter seems unnecessary.

You were definitely mistaken when you thought I may close the issue. Only you or one of the node-webkit's developers may close your issue.

@Doidel Doidel closed this as completed Jun 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants