flyntwp / flynt

Component based WordPress starter theme, powered by ACF Pro and Timber, optimized for a11y and fast page load results.
https://flyntwp.com
MIT License
732 stars 83 forks source link

similar build issue on Windows #522

Closed chris-pdg closed 9 months ago

chris-pdg commented 11 months ago

I am new to Flynt and am having similar difficulty to that reported by @oppenheimer on Windows. Node 20.10.0, composer 2.6.5, flynt 2.01. I can consistently run 'npm run build' with success but 'npm start' consistently seems to cause vite to lock up. Vite clears the files in the /dist folder and it remains empty.

Glad to help test any ideas that anyone has for a solution but I am going to move to my Mac since I am eager to work with Flynt!

timohubois commented 10 months ago

@chris-pdg today I found some time and installed Local, Node.js and Flynt on a fresh machine running Windows 11.

In short: I was able to get it running but run into some potential problems. You can find my results here: https://github.com/flyntwp/flynt/discussions/527#discussioncomment-8027231

If this does not help, I need more details about what setup you exactly use.

fchrapek commented 10 months ago

@timohubois @chris-pdg

I have similar issue on macOS + MAMP Pro (all the requirements are met). Except that run build acts as expected. The npm start doesn't work correctly and clears the built assets.

The weird thing is that it doesn't work on a fresh WP installation, but works ok on an existing instance. Did some quick tests on one of the other local sites beforehand and npm start works fine and all the changes in files are registered correctly with hot reloading. It seems that the only thing that is different between those two sites is the local URL.

timohubois commented 10 months ago

@fchrapek in general when run the command npm start it is correct that the dist will be cleared and only contains one file.

What will be shown when you run npm start?

Did some testing on Windows, and have written down the steps, which may help: https://github.com/flyntwp/flynt/discussions/527#discussioncomment-8027231

fchrapek commented 10 months ago

@timohubois Right, what I meant is that the previously built assets are not loading after running npm start (the dist seem to be correct and has that single file). When I first build the theme with npm run build everything is fine — the development part is not working for me.

I did go thought the thread — I'll double-check that tomorrow, thanks!

fchrapek commented 10 months ago

@timohubois Well, it turned out it was the Brave's default blocking settings that were preventing the assets from loading.

@chris-pdg FYI, maybe this info will be helpful to you

timohubois commented 9 months ago

@fchrapek great to hear, that you found a solution!