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

Using GOV.UK Frontend 4.5.0, opening dev tools causes an error in the terminal #1950

Closed
joelanman opened this issue Jan 31, 2023 · 4 comments
Labels
🐛 Bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@joelanman
Copy link
Contributor

Description of the issue

If you use Frontend 4.5.0 and open dev tools, you get an error in the terminal:

Page not found: /plugin-assets/govuk-frontend/govuk/all.js.map

Steps to reproduce the issue

as above

Actual vs expected behaviour

No error expected

Environment (where applicable)

  • Operating system: MacOS
  • Browser: Chrome
  • Browser version: 109.0.5414.119
  • GOV.UK Prototype Kit version: 13.2.4
@joelanman joelanman added 🐛 Bug Something isn't working the way it should (including incorrect wording in documentation) awaiting triage labels Jan 31, 2023
@BenSurgisonGDS BenSurgisonGDS linked a pull request Feb 3, 2023 that will close this issue
@nataliecarey
Copy link
Contributor

This should be solved within govuk-frontend, not within the prototype kit. It's important that the interface with plugins is kept really clean.

@colinrotherham
Copy link
Contributor

This should be solved within govuk-frontend, not within the prototype kit. It's important that the interface with plugins is kept really clean.

Hi @nataliecarey @joelanman, thanks for spotting this

We've added this comment to all.js so any errors (or console messages) have line numbers etc

//# sourceMappingURL=all.js.map

@BenSurgisonGDS The fix in #1955 looks good, it's quite likely that any 3rd party compiled JavaScript file (or stylesheet) could have a map included, but found recently that source maps don't always equal filename + '.map' sadly 😔

@nataliecarey If a fix in govuk-frontend is preferred, how would you name it here?

scripts: [
  '/govuk/all.js',
  '/govuk-prototype-kit/init.js'
],

@colinrotherham
Copy link
Contributor

I suppose too, would it be worth chatting about using our "source JavaScript" so no source maps are needed?

@joelanman
Copy link
Contributor Author

Fixed in GOV.UK Frontend 4.6.0: https://github.com/alphagov/govuk-frontend/releases/tag/v4.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants