Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Gulp setup fails #1530

Open
ce2kettu opened this issue Jun 21, 2015 · 3 comments
Open

Gulp setup fails #1530

ce2kettu opened this issue Jun 21, 2015 · 3 comments

Comments

@ce2kettu
Copy link

When I run gulp setup, this happens...
C:\Users\Dev\Desktop\ioweb2015>gulp setup
[23:34:24] Using gulpfile ~\Desktop\ioweb2015\gulpfile.js
[23:34:24] Starting 'setup'...
[23:34:24] Starting 'bower'...
[23:34:24] Starting 'godeps'...
[23:34:25] Starting 'addgithooks'...
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn ../node_modules/bower/bin/bower ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3

Any solution?

@plequang
Copy link

Hi,
It seems you're running Windows.

The bower task in gulpfile.js is trying to spawn node_modules/bower/bin/bower which is not a windows executable.

One solution would be to spawn node_modules/.bin/bower which is supposed to run node_modules/.bin/bower.cmd on windows, but this is also not working on windows due to a bug in node nodejs/node-v0.x-archive#2318.

In order to be able to run gulp setup on windows, the simplest is to modify https://github.com/GoogleChrome/ioweb2015/blob/master/gulpfile.js#L90 with

var proc = spawn('..\\node_modules\\.bin\\bower.cmd'

@ce2kettu
Copy link
Author

Yeah that worked but now it throws error while building.

C:\Users\Dev\Desktop\ioweb2015>gulp serve
[15:38:57] Using gulpfile ~\Desktop\ioweb2015\gulpfile.js
[15:38:57] Starting 'backend:build'...
[15:38:57] Starting 'backend:config'...
[15:38:57] Finished 'backend:config' after 15 ms
[15:38:57] Starting 'sass'...
[15:38:58] Starting 'generate-page-metadata'...
[15:38:58] Starting 'generate-data-worker-dev'...
[15:38:58] 'data-worker-dev' all files 40.26 kB
[15:38:58] Finished 'generate-data-worker-dev' after 131 ms
[15:38:58] 'styles' all files 109.16 kB
[15:38:58] Finished 'sass' after 906 ms
[15:38:58] Starting 'generate-service-worker-dev'...
[15:38:58] Skipping static resource 'app/bower_components/moment/min/tests.js' (2.25 MB) - max size is 2.1 MB
[15:38:59] Total precache size is about 21.19 MB for 1025 resources.
[15:38:59] Finished 'generate-service-worker-dev' after 583 ms
[15:38:59] Finished 'generate-page-metadata' after 1.23 s
[15:38:59] Finished 'backend:build' after 1.86 s
[15:38:59] Starting 'serve'...
The app should now be available at: http://localhost:3000/io2015
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn bin/server ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)

@plequang
Copy link

Yes, noticed that too.

It seems this is the serve function in gulp_scripts\backend.js which is failing.
It tries to run backend\bin\server, which is not recognized as a windows executable.
If you rename backend\bin\server to backend\bin\server.exe, the app starts, but then it fails when rendering templates.

I think the app is definitively not windows compatible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants