Dev build not working on Windows (yarn dev)
rocodesign opened this issue · 9 comments
Hi
I got the latest version of the project
ran
yarn
yarn dev
I see the logs:
`
$ cross-env npm run removeAndBuildServer
hapi-react-hot-loader-example@1.0.0 removeAndBuildServer D:\Work\rococode\reacthotloader
cross-env npm run remove && npm run buildServer
hapi-react-hot-loader-example@1.0.0 remove D:\Work\rococode\reacthotloader
cross-env rimraf dist
hapi-react-hot-loader-example@1.0.0 buildServer D:\Work\rococode\reacthotloader
cross-env BABEL_ENV=server ./node_modules/.bin/babel src --out-dir dist
src\client.jsx -> dist\client.js
src\RouterWrapper.jsx -> dist\RouterWrapper.js
src\server\controllers\AssetsController.js -> dist\server\controllers\AssetsController.js
src\server\controllers\ReactController.jsx -> dist\server\controllers\ReactController.js
src\server\plugin\HapiWebpackHotPlugin.js -> dist\server\plugin\HapiWebpackHotPlugin.js
src\server\ServerManager.js -> dist\server\ServerManager.js
src\server.js -> dist\server.js
src\services\ProviderService.js -> dist\services\ProviderService.js
src\services\ServerService.js -> dist\services\ServerService.js
src\stores\loading\LoadingAction.js -> dist\stores\loading\LoadingAction.js
src\stores\loading\LoadingReducer.js -> dist\stores\loading\LoadingReducer.js
src\stores\meta\MetaAction.js -> dist\stores\meta\MetaAction.js
src\stores\meta\MetaReducer.js -> dist\stores\meta\MetaReducer.js
src\stores\render\RenderReducer.js -> dist\stores\render\RenderReducer.js
src\stores\rootReducer.js -> dist\stores\rootReducer.js
src\stores\rootSaga.js -> dist\stores\rootSaga.js
src\stores\user\UserAction.js -> dist\stores\user\UserAction.js
src\stores\user\UserReducer.js -> dist\stores\user\UserReducer.js
src\stores\user\UserSaga.js -> dist\stores\user\UserSaga.js
src\views\about\About.jsx -> dist\views\about\About.js
src\views\about\AboutAsync.jsx -> dist\views\about\AboutAsync.js
src\views\contact\Contact.jsx -> dist\views\contact\Contact.js
src\views\contact\ContactForm.jsx -> dist\views\contact\ContactForm.js
src\views\errors\NotFound.jsx -> dist\views\errors\NotFound.js
src\views\errors\NotFoundAsync.jsx -> dist\views\errors\NotFoundAsync.js
src\views\home\Home.jsx -> dist\views\home\Home.js
src\views\landmarks\Footer.jsx -> dist\views\landmarks\Footer.js
src\views\landmarks\FooterAsync.jsx -> dist\views\landmarks\FooterAsync.js
src\views\landmarks\Header.jsx -> dist\views\landmarks\Header.js
$ cross-env npm run watchServer & npm run devServer
hapi-react-hot-loader-example@1.0.0 watchServer D:\Work\rococode\reacthotloader
cross-env BABEL_ENV=server ./node_modules/.bin/babel src --out-dir dist --watch
src\client.jsx -> dist\client.js
src\RouterWrapper.jsx -> dist\RouterWrapper.js
src\server\controllers\AssetsController.js -> dist\server\controllers\AssetsController.js
src\server\controllers\ReactController.jsx -> dist\server\controllers\ReactController.js
src\server\plugin\HapiWebpackHotPlugin.js -> dist\server\plugin\HapiWebpackHotPlugin.js
src\server\ServerManager.js -> dist\server\ServerManager.js
src\server.js -> dist\server.js
src\services\ProviderService.js -> dist\services\ProviderService.js
src\services\ServerService.js -> dist\services\ServerService.js
src\stores\loading\LoadingAction.js -> dist\stores\loading\LoadingAction.js
src\stores\loading\LoadingReducer.js -> dist\stores\loading\LoadingReducer.js
src\stores\meta\MetaAction.js -> dist\stores\meta\MetaAction.js
src\stores\meta\MetaReducer.js -> dist\stores\meta\MetaReducer.js
src\stores\render\RenderReducer.js -> dist\stores\render\RenderReducer.js
src\stores\rootReducer.js -> dist\stores\rootReducer.js
src\stores\rootSaga.js -> dist\stores\rootSaga.js
src\stores\user\UserAction.js -> dist\stores\user\UserAction.js
src\stores\user\UserReducer.js -> dist\stores\user\UserReducer.js
src\stores\user\UserSaga.js -> dist\stores\user\UserSaga.js
src\views\about\About.jsx -> dist\views\about\About.js
src\views\about\AboutAsync.jsx -> dist\views\about\AboutAsync.js
src\views\contact\Contact.jsx -> dist\views\contact\Contact.js
src\views\contact\ContactForm.jsx -> dist\views\contact\ContactForm.js
src\views\errors\NotFound.jsx -> dist\views\errors\NotFound.js
src\views\errors\NotFoundAsync.jsx -> dist\views\errors\NotFoundAsync.js
src\views\home\Home.jsx -> dist\views\home\Home.js
src\views\landmarks\Footer.jsx -> dist\views\landmarks\Footer.js
src\views\landmarks\FooterAsync.jsx -> dist\views\landmarks\FooterAsync.js
src\views\landmarks\Header.jsx -> dist\views\landmarks\Header.js
`
after that everything is stuck and I can't load anything on localhost:3000
any idea what is wrong?
Can you give me what OS you are on and what is your node version? I haven't tested on Windows. I am on OS X El Capitan and Node v8.1.4
Can you give me more details on everything is stuck? What do you see on localhost:3000?
I just built for the first time off of master and everything seems to be working fine with the following commands:
git clone
cd hapi-react-hot-loader-example
yarn
yarn dev
OSX
node: 7.0.0
npm: 3.10.8
production build works fine though
Windows has a hard time with the single & for parallel executions. Its to do with "dev": "cross-env npm run watchServer & npm run devServer",.
Thanks, we will look into it.
both 'yarn dev' and 'npm run dev' produce the same result.
I also tried replacing the single & with a double && but had the same result.
as a workaround running
"npm run watchServer" and "npm run devServer" in two separate terminals works fine. I guess it can be considered a node/npm bug so I'm closing it.
Reopening because this is something I would like to figure out.
@rocodesign can you test out the fix/dev-task-windows branch and see if it fixes the issue for you.
@rocodesign change of plan. I confirmed with someone else. Check out master because I merged it in. Reopen this issue if it doesn't work.

