Now its running on port 3000, but still I have a blank page thats loading.
I do not get any errors in the console.
I have tried to use port 3020. I have never used it before.
I find it strange that the UI works, but not the actual page. Perhaps BS does not fint the public dir.
I have also tried different publicPaths, but to no avail.
If I remove the http:// in the hosts file I can ping it.
$ ping project-name.test
Pinging project-name.test [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
But, if I remove the http:// from the config.js file. I get a 404 error in the browser when I run yarn
Your hosts file should not include the protocol (i.e. http://). All the hosts file does it tell your system what domain to resolve to a particular IP. You’re probably breaking it by including the protocol.
You also cannot ping something w/ a protocol: ping is doing just trying to resolve a domain to an IP—giving it a protocol will confuse it, because it will try to resolve the http://project-name.test as a domain, which it is not (it is a URL).
Your config.jsondoes need the protocol though, because it is asking for a URL, not a domain.
The doble backslash is an attempt to make it work on windows.
Here you see the location I run yarn from
Andreas@SISSI /f/xampp/htdocs/wp-content/themes/indredata
$ yarn run start
/c/Program Files (x86)/Yarn/bin/yarn: line 3: readlink: command not found
yarn run v1.0.1
$ webpack --hide-modules --watch --config resources/assets/build/webpack.config.js
Hi @andreaslyngstad - I may be misunderstanding you, but your xampp server shouldn’t be running on localhost:3000; that’s where Browsersync should be running.
If you need help setting up xampp, or configuring Apache inside it, I would visit those projects or Google for tutorials.
My recommendation if you want to make setting up a local server as simple as humanly possible would be to install Local by Flywheel. https://local.getflywheel.com/
I would make sure no xampp services are running, install Local, add a site, copy your theme, and update any host/path references as needed (e.g., the devUrl).
Thanks @mmirus - I installed Local by Flywheel: It works! I guess I had to setup some virual host in apache, But I could not find the proper settings for Browser Sync. Thanks to you I can start develop my first page using the sage theme.
@ben Thanks for all your replies and effort. There should be some mention of a working server in the listed dependencies under theme installation. There is a lot of components that gets installed with composer. It is a lot of new things to comprehend at once. Perhaps there could be a suggestion to use Local by flywheel for nobs like me. Just to get up and running.