Skip to content

Weird error MSB6006: "cmd.exe" exited with code 1 on some packages #1151

Closed
@jviotti

Description

@jviotti

We've been facing a very strange issue at Etcher (https://github.com/resin-io/etcher). We have node-sass as a development dependency, and lzma-native as a production dependency.

When node-gyp was updated to v3.6.0, node-sass picked up this change, causing lzma-native to fail with the following error on Windows:

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]

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 that node-sass compiles just fine, and removing node-sass from the development dependencies causes lzma-native to start working again. As a fix, we've started shrinkwrapping development dependencies as well, and locking node-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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions