vue-wordpress icon indicating copy to clipboard operation
vue-wordpress copied to clipboard

Cannot run the dev mode (npm run dev)

Open michaelscheurer opened this issue 5 years ago • 2 comments

Hi @bucky355 Thanks for this awesome work you made with this repo. Very interesting aproach. I'll give it a try.

So far it's all working. Except that I can't run the dev mode (meaning: npm run dev). "npm run build" is perfectly working though.

The steps I tried (following your docs): 1.) startet "npm run dev" in the console, where the theme lives (seems to work: "compiled successfully") 2.) edited functions.php as described 3.) I open the url (localhost:8080) and only get a listing with files and folders of the root folder in my WordPress theme.

grafik

What am I doing wrong?

Thanks so much for helping me out.

Cheers

Michael

michaelscheurer avatar Jun 04 '19 09:06 michaelscheurer

I don't know how to solve the issue you are facing but I am using WAMP to run wordpress and npm run dev to run the javascipt file. It might be hacky, but it works for me

shubhra14 avatar Jun 05 '19 14:06 shubhra14

Ya, you would need a local WP set up using XAMP/WAMP or whatever, which is used to serve the site.

The webpack dev server is just used for the live reloading of the JS and CSS files. You wouldn't try and access the dev site through localhost:8080, you would need to use wherever you have your local WP instance set up ( like localhost/wp/my-site )

It is pretty hacky, but it was the only solution I could come up with that was still practical.

bshiluk avatar Jun 05 '19 15:06 bshiluk