So only one of the server starts successfully and the other one(s) are not, as you can see here:
yarn dev v0.24.6
$ razzle start
WAIT Compiling...
DONE Compiled successfully
Your application is running at http://127.0.0.1:80
So I need to terminate the batch job and start it again.
Steps to reproduce:
build folderI am working on a fix for Windows. Again this doesn't happen on Mac.
Temporary workaround:
yarn add rimraf --dev
in your package.json start script
{
"scripts" {
"start": "rimraf build && razzle start"
}
}
Are you running in VM ?
No, I am using Windows (10) on my laptop.
This issue is not a big deal for me at all, I just reported it.
Hi @jaredpalmer, you can keep this issue closed if you wish.
I am just leaving a note here that this is still an issue as of version 0.8.2.
On linux, on a fresh start (the build folder doesn't exist), this issue is present.
$ yarn start 2>&1 | tee error
# content of error file
yarn start v1.0.1
$ razzle start
WAIT Compiling...
[2J[3J[H DONE Compiled successfully
Your application is running at http://localhost:3000
Content of build folder:
$ ls build
assets.json
Apparently, the build folder is created after the server is compiled. If the build folder is created before running yarn start everything works as expected:
$ rm -rf build && mkdir build && yarn start 2>&1 | tee output
# content of output
yarn start v1.0.1
$ razzle start
WAIT Compiling...
[2J[3J[H DONE Compiled successfully
Your application is running at http://localhost:3000
[2J[3J[H WAIT Compiling...
[2J[3J[H DONE Compiled successfully
Your application is running at http://localhost:3000
✅ Server-side HMR Enabled!
> Started on port 3000
Content of build:
$ ls build
assets.json server.js server.js.map
As @kireerik said:
rm -rf build
yarn start
Add rimraf (as @jaredpalmer suggested) and mkdirp (in order to create the build folder):
yarn add --dev rimraf mkdirp
And edit package.json:
{
// ...
"scripts" {
"start": "rimraf build && mkdirp build && razzle start"
}
// ...
}
$ uname -a
Linux 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64 GNU/Linux
$ node -v
v8.4.0
$ yarn -v
1.0.1
$ yarn list razzle yarn list v1.0.1
└─ [email protected]
Done in 0.95s.
Hi @jaredpalmer, you can keep this issue closed if you wish.
I am just leaving a note here that this is still an issue as of version 0.8.7.
I don’t have a windows machine and can’t replicate on Mac
I'm experiencing the same issue and I'm not using yarn (the same behavior appears on Windows and GNU/Linux)... sometimes the process just got stuck on "Your application is running at http://localhost:3000" (no other outputs) even though the server is never started.
This is no longer an issue as of version 2.x.
Most helpful comment
On linux, on a fresh start (the
buildfolder doesn't exist), this issue is present.Content of
buildfolder:Apparently, the
buildfolder is created after the server is compiled. If thebuildfolder is created before runningyarn starteverything works as expected:Content of build:
Steps to reproduce
As @kireerik said:
Workaround
Add
rimraf(as @jaredpalmer suggested) andmkdirp(in order to create thebuildfolder):And edit
package.json:Versions: