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

building on Windows with NVM fails #469

Closed
corvinrok opened this issue Aug 17, 2016 · 0 comments
Closed

building on Windows with NVM fails #469

corvinrok opened this issue Aug 17, 2016 · 0 comments

Comments

@corvinrok
Copy link

When trying to build Edge on my machine, the follow errors result when running the recommended bat files for building (no matter if I try to use the buildall.bat, build_double.bat or build.bat , results are the same) :

Building edge.node release for node.js x64 v5.1.0
Cannot find node-gyp at C:\Users\myusername\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js. Make sure to instal l with npm install node-gyp -g

The issue is that the BAT scripts are using (found on line 51 of build.bat, and line 89 of build_double.bat )
set GYP=%APPDATA%\npm\node_modules\node-gyp\bin\node-gyp.js

The script should be deriving the path of a installed node-gyp by asking NODE where its modules are installed, not by assuming it will be located in the specific hard coded %APPDATA% .

For example, rebuilding tools generally resort to the equivalent of the javascript (such as in electron-rebuild and the like) :
require.resolve('npm/node_modules/node-gyp/bin/node-gyp')

to get the properly resolved module location. (although that resolves to local copies, if installed, and you may want to get the globally installed only)...

As it is, users with node version control of any kind, will get the kind of failure reported above.

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

Successfully merging a pull request may close this issue.

2 participants