thoughtbot / proteus-gulp

[no longer maintained]
51 stars 8 forks source link

proteus server fails to start #6

Closed rohannair closed 9 years ago

rohannair commented 9 years ago

Installed proteus and initialized gulp via $ proteus new gulp <PROJECT NAME>. Built dependencies using $ proteus setup and proceeded to initialize server through $ proteus server, but the server failed when trying to start express. Error message below:

09:21:41] Error: Cannot find module 'connect-livereload'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Gulp.gulp.task.gulp.src.pipe.sass.loadPath (/Users/rohan/Workspace/<PROJECT NAME>/Gulpfile.js:23:11)
  at module.exports (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
  at Gulp.Orchestrator._runTask (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at /Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:279:18
  at finish (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at module.exports (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:60:3)
  at Gulp.Orchestrator._runTask (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at /Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:279:18
  at finish (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at module.exports (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:60:3)
  at Gulp.Orchestrator._runTask (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at /Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:279:18
  at finish (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
  at module.exports (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:60:3)
  at Gulp.Orchestrator._runTask (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
  at Gulp.Orchestrator._runStep (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
  at Gulp.Orchestrator.start (/Users/rohan/Workspace/<PROJECT NAME>/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
  at /usr/local/lib/node_modules/gulp/bin/gulp.js:121:20
  at process._tickCallback (node.js:419:13)
  at Function.Module.runMain (module.js:499:11)
  at startup (node.js:119:16)
  at node.js:906:3

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
  at errnoException (child_process.js:1001:11)
  at Process.ChildProcess._handle.onexit (child_process.js:792:34) 

Proceeded to add express manually with $ npm install --save-dev express and ran $ proteus serve again, with another error:

$ proteus server
$ Starting the server
[09:22:27] Using gulpfile ~/Workspace/<PROJECT NAME>/Gulpfile.js
[09:22:27] Starting 'views'...
[09:22:27] Finished 'views' after 5.58 ms
[09:22:27] Starting 'stylesheets'...
[09:22:27] Starting 'javascripts'...
[09:22:27] Starting 'images'...
[09:22:27] Finished 'images' after 704 μs
[09:22:27] Starting 'fonts'...
[09:22:27] Finished 'fonts' after 445 μs
[09:22:27] Starting 'express'...
[09:22:27] Finished 'express' after 91 ms
[09:22:27] Starting 'livereload'...
[09:22:27] Finished 'livereload' after 61 ms
[09:22:27] Starting 'watch'...
[09:22:27] Finished 'watch' after 18 ms

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
  at errnoException (child_process.js:1001:11)
  at Process.ChildProcess._handle.onexit (child_process.js:792:34)

There is no events.js file in the entire directory though, so I can't even trace that error.

whmii commented 9 years ago

From the look of the repo there is no baked in server setup, especially live reload. @joshuaogle correct?

joshuaogle commented 9 years ago

Hi Rohan, Looks like that was carried over from when we switched our LiveReload implementation. We were planning to switch the server to Browsersync eventually anyway, so I just made a PR to do that, which solves your issue as well.

justincharles commented 9 years ago

Hi Joshua, I ran into the same issue as Rohan and after making the edits to the gulpfile and the package.json from your pull request I still get the same second error that Rohan got.

joshuaogle commented 9 years ago

@justincharles And you went through the npm install and restarted? That was working for me, but I'll investigate again

justincharles commented 9 years ago

@joshuaogle Yes. Still didn't work.

joshuaogle commented 9 years ago

@justincharles It looks like the Browsersync branch didn't have the updated script permissions, but after a rebase it works. If you update it should work for you.

@rohannair The update to Browsersync is now merged, which fixes your problem.

joshuaogle commented 9 years ago

Closing this issue, but if you have any problems with the new Browsersync setup feel free to open a new one. Thanks guys!