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

fix(gatsby-plugin-netlify): upgrade webpack-assets-manifest for compatibility with webpack@5 #30217

Conversation

pedrolamas
Copy link
Contributor

Description

Some deprecation errors are showing from gatsby build when gatsby-plugin-netlify is in use, this fixes the problem by upgrading the webpack-assets-manifest version to the same used in the rest of gatsby codebase.

Related Issues

Fixes #29974

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 12, 2021
@kimbaudi
Copy link
Contributor

kimbaudi commented Mar 13, 2021

@pedrolamas - did you run yarn jest gatsby-plugin-netlify afterwards? If so, you should have gotten an error (at least, it happened to me):

`TypeError: Cannot read property 'RawSource' of undefined

I guess what I'm trying to say is, you can't just upgrade webpack-assets-manifest from current version 3 to the latest version 5.

@pedrolamas
Copy link
Contributor Author

@kimbaudi I did indeed, it passed perfectly on my end (tested under Windows 10)!

image

@kimbaudi
Copy link
Contributor

@pedrolamas - I just tested after upgrading to "webpack-assets-manifest": "^5.0.1" and one of the tests are failing. I'm on Windows 10 also.

not-working

@pedrolamas
Copy link
Contributor Author

@kimbaudi Can I ask you to checkout my branch, run git clean -x -d -f to remove all other files (please be aware this is like a new checkout of the repo, so all non-commited files will be removed!), and then run yarn bootstrap before running the tests again?

@kimbaudi
Copy link
Contributor

@pedrolamas - ok I'll check out your branch and give it a shot. btw, you can shorten the command to git clean -xfd (i do this often 😄)

@pedrolamas
Copy link
Contributor Author

pedrolamas commented Mar 14, 2021

Sorry @kimbaudi, I'm not a big git cli user, so I'm just copying the commands from Git Extensions! 😁

@kimbaudi
Copy link
Contributor

kimbaudi commented Mar 14, 2021

@pedrolamas - I tested on your branch (and on my fork as well) and it works. I guess I did something wrong earlier. sorry about that

works

@LekoArts LekoArts added topic: netlify and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 15, 2021
@pieh pieh self-assigned this Mar 15, 2021
@pieh pieh changed the title Updates webpack-assets-manifest dependency in gatsby-plugin-netlify fix(gatsby-plugin-netlify): upgrade webpack-assets-manifest for compatibility with webpack@5 Mar 15, 2021
@pedrolamas
Copy link
Contributor Author

For the record, I've tested this change locally with yalc and it worked fine for me (error messages are gone).

image

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sidharthachatterjee sidharthachatterjee merged commit ca44a9e into gatsbyjs:master Mar 15, 2021
@1-800-jono
Copy link
Contributor

@pedrolamas - did you run yarn jest gatsby-plugin-netlify afterwards? If so, you should have gotten an error (at least, it happened to me):

`TypeError: Cannot read property 'RawSource' of undefined

I guess what I'm trying to say is, you can't just upgrade webpack-assets-manifest from current version 3 to the latest version 5.

I just upgraded Gatsby to v3.9.1 and gatsby-plugin-netlify v3.9.0 and getting this same error.

@1-800-jono
Copy link
Contributor

Never mind - fixed by running npm cache clean --force as a last resort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[gatsby-plugin-netlify] depracated webpack-assets-manifest causing errors during build
6 participants