oreqizer / reactizer-2016

(UNMAINTAINED) The most hipster React and React Native boilerplate! :smiling_imp:
https://reactizer.herokuapp.com
MIT License
73 stars 6 forks source link

Stuck on `npm start` #21

Open smeijer opened 7 years ago

smeijer commented 7 years ago

It keeps hanging on Starting '<anonymous>'

C:\dev\reactizer (master) (reactizer@0.10.0)
$ npm start

> reactizer@0.10.0 start C:\dev\reactizer
> gulp & nodemon ./etc/devserver --verbose

[17:38:19] Requiring external module babel-register
[17:38:23] Using gulpfile C:\dev\reactizer\gulpfile.babel.js
[17:38:23] Starting 'default'...
[17:38:23] Starting 'clean'...
[17:38:23] Finished 'clean' after 42 ms
[17:38:23] Starting 'sprites'...
[17:38:25] Finished 'sprites' after 1.1 s
[17:38:25] Starting 'statics'...
[17:38:25] Finished 'statics' after 27 ms
[17:38:25] Starting 'locales'...
[17:38:25] Finished 'locales' after 8.87 ms
[17:38:25] Starting '<anonymous>'...
oreqizer commented 7 years ago
screen shot 2016-12-04 at 18 30 22

Did rm -rf node_modules && yarn install now, works fine for me. What node version are you using?

I got 7.2.0

smeijer commented 7 years ago

I was using 6.9.1, but now tried with 7.2.0 as well. Same results as before. Can it be that the single & doesn't work on windows?

Running just: node ./etc/devserver --verbose works, as wel as just gulp. The later seems to be hanging on Starting <anonymous>, but I guess that is as designed? The second part of the script gulp & nodemon ./etc/devserver --verbose doesn't seem to be invoked.

If windows doesn't support the forking & operator, this behavior would make sense.

oreqizer commented 7 years ago

hmm you're probably right, never done much Windows CLI stuff. feel free to submit a PR if you come with a cross platform solution, I'll have a look at it after midterm tests

smeijer commented 7 years ago

I found a solution here: https://github.com/este/este/issues/460. It does work when I use concurrently:

    "start": "concurrently \"gulp\" \"nodemon ./etc/devserver --verbose\"",
smeijer commented 7 years ago

Okay; The PR must wait, because I'm not tracking your repo any more since you've switched from saga's to observables. But this is in my opinion the best fix:

yarn add --dev npm-run-all

package.json:

"scripts": {
    "start": "run-p gulp nodemon",                   // change
    "nodemon": "nodemon ./etc/devserver --verbose",  // add
    "gulp": "gulp",                                  // add

npm-run-all turned out to be a better solution than the earlier mentioned concurrently

oreqizer commented 7 years ago

thanks for the input! i'll add it asap