-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Weird error MSB6006: "cmd.exe" exited with code 1 on some packages #1151
Comments
We've been recently hitting a weird `lzma-native` build error on Windows (both locally and on Appveyor CI): ``` Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. build The input line is too long. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\projects\etcher\node_modules\lzma-native\build\liblzma.vcxproj] ``` After a lot of experimentation, we realised the issue was gone if we removed `node-sass` from the development dependencies. The issue is that `node-gyp` was recently upgraded to v3.6.0, which was picked up by `node-sass`, which declares `node-gyp` as a dependency. For some reason, if `node-sass` causes `node-gyp` to be updated, then `lzma-native` fails with the above cryptic error. I was able to trace down the error to the following `node-gyp` commit: nodejs/node-gyp@ae141e1 As a solution, this commit starts to shrinkwrap development dependencies, and locks `node-gyp` to v3.5.0 until the issue is fixed. Fixes: addaleax/lzma-native#30 See: nodejs/node-gyp#1151 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We've been recently hitting a weird `lzma-native` build error on Windows (both locally and on Appveyor CI): ``` Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. build The input line is too long. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\projects\etcher\node_modules\lzma-native\build\liblzma.vcxproj] ``` After a lot of experimentation, we realised the issue was gone if we removed `node-sass` from the development dependencies. The issue is that `node-gyp` was recently upgraded to v3.6.0, which was picked up by `node-sass`, which declares `node-gyp` as a dependency. For some reason, if `node-sass` causes `node-gyp` to be updated, then `lzma-native` fails with the above cryptic error. I was able to trace down the error to the following `node-gyp` commit: nodejs/node-gyp@ae141e1 As a solution, this commit starts to shrinkwrap development dependencies, and locks `node-gyp` to v3.5.0 until the issue is fixed. Fixes: addaleax/lzma-native#30 See: nodejs/node-gyp#1151 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Hmm, I wonder if the problem might be that this part of the change: function findMsbuild () {
if (config.variables.msbuild_path) {
command = config.variables.msbuild_path means that the MSBuild command is now run with its full-path |
hmmm... giving this some thought... |
|
Scratch that!
to: (extra
Instead of
|
Awesome, great to hear you found the root cause of this issue! BTW, could you explain why in our case Is this correct? |
* chore: fix `lzma-native` build issues on Windows We've been recently hitting a weird `lzma-native` build error on Windows (both locally and on Appveyor CI): ``` Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. build The input line is too long. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\projects\etcher\node_modules\lzma-native\build\liblzma.vcxproj] ``` After a lot of experimentation, we realised the issue was gone if we removed `node-sass` from the development dependencies. The issue is that `node-gyp` was recently upgraded to v3.6.0, which was picked up by `node-sass`, which declares `node-gyp` as a dependency. For some reason, if `node-sass` causes `node-gyp` to be updated, then `lzma-native` fails with the above cryptic error. I was able to trace down the error to the following `node-gyp` commit: nodejs/node-gyp@ae141e1 As a solution, this commit starts to shrinkwrap development dependencies, and locks `node-gyp` to v3.5.0 until the issue is fixed. Fixes: addaleax/lzma-native#30 See: nodejs/node-gyp#1151 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org> * chore: ensure some modules in npm-shrinkwrap stay at specific versions * Address code review comments Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
|
@refack Yeah, but it’s still a curious thing how the |
I'm afraid I'll have to disagree with the And our workaround for the problem in balena-io/etcher#1191 was to basically version-lock |
I said might... 🤷 |
Microsoft's chakracore engine is dependent on Windows SDK, and build tools should know the version installed on user machine. This change adds those dependencies in node-gyp tools. Below is the summary: * Configure msvs_windows_target_platform_version to use the right Windows SDK. * Configure msvs_use_library_dependency_inputs to export symbols correctly (otherwise functions not used by node.exe but might be needed by native addon modules could be optimized away by linker). These changes were originally made in nodejs/node#4765, but as @shigeki mentioned, it was more sensible to send these changes as PR to node-gyp repo. PR-URL: #873 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Found it |
test the fix for nodejs#1151
resolved in @3.6.1 |
test the fix for nodejs#1151 Ref: nodejs#1153
Changelog diff: diff --git a/History.md b/History.md index 4fab6d9..2132507 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,11 @@ # Revision history for unqlite +0.3.5 / 2017-06-01 +================== + + * Add workaround for gyp issue: nodejs/node-gyp#1151 + * Use Nan::ForceSet() instead of v8::Object::ForceSet() + 0.3.4 / 2016-06-29 ==================
Having the same problem in 3.6.2 $ npm install
|
We've been facing a very strange issue at Etcher (https://github.com/resin-io/etcher). We have
node-sass
as a development dependency, andlzma-native
as a production dependency.When
node-gyp
was updated to v3.6.0,node-sass
picked up this change, causinglzma-native
to fail with the following error on Windows:So to make it clear, after the
node-gyp
upgrade on a development dependency (node-sass
), a totally unrelated production dependency,lzma-native
, suddenly starts to fail on Windows. What's even more strange is thatnode-sass
compiles just fine, and removingnode-sass
from the development dependencies causeslzma-native
to start working again. As a fix, we've started shrinkwrapping development dependencies as well, and lockingnode-gyp
to v3.5.0, which makes everything work again.The problem seems to have been introduced by ae141e1, however I don't understand why.
See balena-io/etcher#1191. You can probably reproduce by cloning Etcher, checking out a commit before such fix, and running
make electron-develop
(which is a Makefile target that we use to pass some node-gyp options to npm, run bower, etc).The text was updated successfully, but these errors were encountered: