Skip to content

Commit

Permalink
chore: fix lzma-native build issues on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juan Cruz Viotti committed Mar 20, 2017
1 parent c9702c3 commit e3a4bd2
Show file tree
Hide file tree
Showing 4 changed files with 4,579 additions and 43 deletions.
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ necessary dependencies get added is to run the following commands:
```sh
make electron-develop
npm prune --production
npm shrinkwrap
npm shrinkwrap --dev
```

- Commit *both* `package.json` and `npm-shrinkwrap.json`.
Expand Down
Loading

0 comments on commit e3a4bd2

Please sign in to comment.