Gulp fails on Windows
What's the issue?
When running gulp on Windows 10:
[00:18:21] Using gulpfile ~\Sources\amphtml\gulpfile.js
[00:18:21] Starting 'update-packages'...
[00:18:29] Installed lint rules from build-system/eslint-rules
[00:18:32] WARNING: The packages in node_modules do not match package.json.
npx: installed 1 in 1.468s
Path must be a string. Received undefined
null
yarn check v1.9.4
success Folder in sync.
Done in 22.89s.
[00:18:57] Running yarn to update packages...
npx: installed 1 in 1.454s
Path must be a string. Received undefined
null
yarn install v1.9.4
$ node build-system/check-package-manager.js
Detected node version v8.11.4 (latest LTS).
Detected gulp version 3.9.1.
WARNING: Something went wrong. Could not determine the stable version of yarn.
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 10.99s.
[00:19:10] Patched node_modules/web-animations-js/web-animations.install.js
[00:19:10] Patched node_modules/document-register-element/build/document-register-element.patched.js
[00:19:10] Finished 'update-packages' after 49 s
[00:19:10] Starting 'watch'...
[00:19:10] Running watch. Press Ctrl + C to cancel...
[00:19:10] Building the runtime for local testing with the prod AMP config.
[00:19:10] ⤷ Use --config={canary|prod} with your gulp watch command to specify which config to apply.
[00:19:10] Building all AMP extensions.
[00:19:10] ⤷ Use --noextensions to skip building extensions.
[00:19:10] ⤷ Use --extensions=amp-foo,amp-bar to choose which extensions to build.
[00:19:10] ⤷ Use --extensions=minimal_set to build just the extensions needed to load article.amp.html.
[00:19:10] ⤷ Use --extensions_from=examples/foo.amp.html to build extensions from example docs.
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn sh ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Yarn was installed using the official installer for Windows, I don't know why it couldn't determine its own version, it's strange.
How do we reproduce the issue?
https://github.com/ampproject/amphtml/blob/master/contributing/getting-started-e2e.md#building-amp-and-starting-a-local-server
Which AMP version is affected?
from master
@erwinmombay @danielrozenberg Can one of you look into this next week? You'll probably need a Windows VM for testing, available free here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
More info: gulp build actually works for me when I run it from Git Bash, but fails when using Powershell or cmd.
@erwinmombay @danielrozenberg Any updates here?
Right. This addresses the issue
@rsimha I think this issue may be closed