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

Not installing on Windows 10 with VS2017 #65

Closed
MayaLekova opened this issue Jan 29, 2018 · 8 comments
Closed

Not installing on Windows 10 with VS2017 #65

MayaLekova opened this issue Jan 29, 2018 · 8 comments

Comments

@MayaLekova
Copy link

When trying to install the module (as an optional dependency from another one) on a machine with Windows 10 and Visual Studio 2017 installed, I'm getting the following build error:
MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.

Here's the full output from npm:

> sse4_crc32@5.1.1 install <path to project>\node_modules\sse4_crc32
> node-gyp rebuild


<path to project>\node_modules\sse4_crc32>if not defined npm_config_node_gyp (node "D:\nvm\v6.11.5\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB4025: The project file could not be loaded. Root element is missing.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\nvm\v6.11.5\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\nvm\\v6.11.5\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd <path to project>\node_modules\sse4_crc32
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sse4_crc32@5.1.1 (node_modules\sse4_crc32):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sse4_crc32@5.1.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

As far as I read the other Windows-related issues this problem is not mentioned, so I'm assuming it's a new one. Shall I try to manually upgrade the project file by opening it with VS2017 or something else?

Note 1: I'm trying to build using "x86_x64 Cross Tools Command Prompt for VS 2017" (which supposedly should have the proper environment setup).
Note 2: My Node.js is installed via nvm-windows.

Thank you in advance!

@anandsuresh
Copy link
Owner

Hi @MayaLekova, I haven't had tested this module much on the Windows platform, partly because I don't develop on that platform. Can you please re-run the installation with debug flags enabled to get more detailed logs for this issue and post them here?

@MayaLekova
Copy link
Author

Hello @anandsuresh , sorry for the late reply! I've ran npm install --verbose and I'm attaching the output:
sse_debug.log

Hope that helps! If you need me to try with any patch, will be more than happy to assist you.

@anandsuresh
Copy link
Owner

@MayaLekova can you please try again with the latest build and see if that helps? @zbjornson has fixed this issue.

@MayaLekova
Copy link
Author

Hello again,

I tried installing the module with "npm install" and I get the same error (for version 5.2.0). However I also tried downloading the latest version of the source and building it manually. "npm install" in the root directory still fails, but it creates a solution file for an older version of Visual Studio. When I open it, VS upgrades the project files to its new format and I'm able to successfully build the project (manually from VS).

I'm guessing there's some configuration issue with node-gyp and maybe my system having too new version of VS, Windows SDK or something like this. Anyway, thanks for the help!

@zbjornson
Copy link
Contributor

@MayaLekova can you attach the debug log again please? Also, can you try node-gyp rebuild --msvs_version=2017?

@zbjornson
Copy link
Contributor

(If you aren't setup with node-gyp globally, you can also pass that option to npm, npm install --msvs_version=2017.)

@MayaLekova
Copy link
Author

Dear @zbjornson ,

Thank you for the tips!

After trying the --msvs_version=2017 flag I ended up having the error reported here. Which led me to the conclusion that my globally installed node-gyp version was too old (3.4) and doesn't support VS2017. After installing node-gyp v3.6.2 globally, the installation now is successful! :)

@zbjornson
Copy link
Contributor

Awesome 🎉!

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