Closed zhampu closed 4 years ago
I changed a lot regarding the setup, template naming and so on these past days. The app was indeeed refreshing twice. This is fixed now.
great! will try to retake my projetct with this template.
however, while trying to run npm run serve
I got this:
ERROR Failed to compile with 1 errors 2:15:44 PM
error in ./src/setup/router.js
Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: Cannot read property 'range' of null
The former setup will work as well. These last few days I tried to simplify even more to lower the boarding hurdle working with this project.
This is an issue with Babel. See https://github.com/babel/babel-eslint/issues/681
To fix it, remove the node_modules
folder and run npm i
freshly.
If that doesn't fix the problem, add "@babel/parser": "7.7.5"
to your devDependencies
inside your package.json
and run npm i
again.
Yeah that worked. now getting this thou:
DONE Compiled successfully in 2613ms 2:33:01 PM
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.157:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
Proxy error: Could not proxy request /home.json from localhost:8080 to http://127.0.0.1:8000.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
Which OS are you on? There seems to be a problem starting the PHP server from within Node on macOS.
Alternative: Set serveKirby
inside the Vue config to false
. Then run ./serve
first (you may have to set executable permission like chmod u+x serve
), npm run serve
afterwards.
The serve script just starts the PHP server. Meaning php -S 127.0.0.1:8000 -t public/ server.php
under the hood.
Local development is a bit trickier, because we have to start the PHP server as easy as possible, which isn't that easy after all. Would be nice to auto start it while npm run serve
. I'll try to fix that later.
Okay, fixed it! There was a typo preventing Node to start the server. You can use npm run serve
again. Remember to set serveKirby
back to true
, if you have changed it.
Hey, I just noticed you restructure the template. My app was rendering twice on refresh ( in production), is this something you fixed in this version?