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

make fails on Windows when PATH doesn't include '.' #39

Closed
martinthomson opened this issue Mar 6, 2012 · 4 comments
Closed

make fails on Windows when PATH doesn't include '.' #39

martinthomson opened this issue Mar 6, 2012 · 4 comments

Comments

@martinthomson
Copy link

The 'make.bat' script doesn't intercept the 'preinstall' call to 'make' if the PATH doesn't include '.'

     [exec] > ws@0.4.8 preinstall C:\code\msg\sandbox\users\martin\msgwebrtcapi\node_modules\ws
     [exec] > make
     [exec] CreateProcessW: The system cannot find the file specified.
     [exec] npm ERR! ws@0.4.8 preinstall: `make`
     [exec] npm ERR! `cmd "/c" "make"` failed with 127
@einaros
Copy link
Contributor

einaros commented Mar 6, 2012

This isn't necessarily easy to circumvent. Are you running this through some custom installer?

@martinthomson
Copy link
Author

Just running npm.cmd install socket.io. It's part of a build process that has a controlled environment. Adding '.' to the path is possible, but not desirable. Maybe you could create a preinstall.js script that did the necessary magic (I don't fully understand why you need a Makefile) and run 'node preinstall' instead of make.

@einaros
Copy link
Contributor

einaros commented Mar 6, 2012

To start with the end: I need a makefile on non-windows systems to build the native extensions. The native extensions, in turn, makes ws much faster than it'd be with plain JavaScript, in addition to providing actual utf8 verification of the incoming stream.

Regarding a preinstall script, this is possible as well, but it would require some finesse. In specialized build environments such as the one you are using I can't even guarantee that node is in the path, so executing a preinstall.js could fail for completely different reasons.

This will all change in future versions of node (0.7+), when the gyp build system replaces node-waf. Any sort-of-working hack would thus just be temporary, and probably not be a catch-all in either case. I think I'll just have to say that any specialized build system will have to be adapted (such as adding . to the path, or actually running npm install from within the actual project directory).

In either case, I'll get back to you on this in the morning. I may decide to work around it.

@martinthomson
Copy link
Author

Integrating different build systems is a complicated process. Obviously, since you have special requirements, you end up with special problems. Whatever you judge to be the best.

@einaros einaros closed this as completed Mar 22, 2012
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

2 participants