Skip to content

404 errors for missing assets/scripts when running yarn run dev #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
swissspidy opened this issue Mar 17, 2023 · 4 comments
Closed

404 errors for missing assets/scripts when running yarn run dev #154

swissspidy opened this issue Mar 17, 2023 · 4 comments
Labels

Comments

@swissspidy
Copy link
Member

First of all, kudos to this new setup. I just tried yarn build followed by yarn run dev and it's very fast! Very nice experience.

What caught my eye though when opening the playground site is errors about some seemingly missing files:

Screenshot 2023-03-17 at 09 50 09

Screenshot 2023-03-17 at 09 52 50

@adamziel
Copy link
Collaborator

adamziel commented Mar 17, 2023

Thank you for the report! It looks like it can’t find some static files from wp-6.1 directory. The wp-includes dir is here:

https://github.com/WordPress/wordpress-playground/tree/trunk/packages/playground/remote/public/wp-6.1/wp-includes

But the dist directory is nowhere to be found. I bet that’s because it got excluded because of the dist rule in .gitignore.

You can restore these files by rebuilding WordPress:

nx recompile-wordpress:all playground-remote

I’m traveling to Rust now and can’t push a fix, but if you’d start a PR then I would merge it!

@swissspidy
Copy link
Member Author

swissspidy commented Mar 17, 2023

Makes sense. That doesn't explain the first error with the missing SVG file though, as that one exists: https://github.com/WordPress/wordpress-playground/blob/b60ea1625ecec159cac0e9585e1edebdd786751b/packages/playground/remote/public/wp-6.1/wp-admin/images/about-header-about.svg


Aside: seems weird to have full copies of all WP versions in the repo. Maybe those should be git submodules or separate packages or something?

@adamziel
Copy link
Collaborator

adamziel commented Mar 18, 2023

The SVG gets removed somewhere in the WP build process, unfortunately, it would be good to retain it.

The dist/ issue is fixed in 70e5aa4.

As for the full copies – I agree it's weird. They're here for now to reduce the initial setup hurdle but I'd like to offer that benefit without those files in the repo.

@adamziel
Copy link
Collaborator

adamziel commented Jun 2, 2023

This is now resolved, and the issue related to keeping the full copies of source files is tracked separately in #58

@adamziel adamziel closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants