Skip to content
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

Navigation Responsive 'frontend.js' missing for view #31909

Closed
pbking opened this issue May 17, 2021 · 2 comments · Fixed by #31917
Closed

Navigation Responsive 'frontend.js' missing for view #31909

pbking opened this issue May 17, 2021 · 2 comments · Fixed by #31917
Assignees
Labels
[Status] In Progress Tracking issues with work in progress

Comments

@pbking
Copy link
Contributor

pbking commented May 17, 2021

Description

Attempting to leverage this recent change I was unable to open the responsive menu due to a javascript error (missing resource).

Step-by-step reproduction instructions

Add a menu block to a page and populate it with at least one menu item.
Select 'Enable Responsive Menu' from the Navigation Block Editor Panel
Save the Page and load it in the view.
Reduce the screen width until the mobile navigation menu is shown.
Click the mobile navigation menu.
Note that it does not open.
Note the error presented in the console regarding the missing frontend.js

GET http://localhost:4759/wp-content/plugins/gutenberg/build/block-library/blocks/navigation/frontend.js?ver=5.7.2 net::ERR_ABORTED 404 (Not Found)

Note that the frontend.js file present in /packages/block-library/src/navigation is absent from the build location.

I built (and rebuilt, and cleaned and rebuilt) Gutenberg many times. Manually copying the file into the expected location produced errors (import not being something that can be leveraged in that situation it seems).

Expected behaviour

The frontend.js file should be transpiled and available.

WordPress information

  • WordPress version: latest (wp-env)
  • Gutenberg version: trunk
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? No
@pbking
Copy link
Contributor Author

pbking commented May 17, 2021

@vcanales
Copy link
Member

Hi @pbking ! Thanks for reporting this — I've created #31917 in order to address it. I'd appreciate it if you could test again using that branch.

The issue is caused by outputting the wrong destination for the Navigation block's frontend.js file when creating the production build — this issue does not exist when running a development build, which might help understand why we didn't catch it before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants