question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Description

I am upgrading to gatsby v3 and I am using gatsby-plugin-netlify, during build time I get the following errors:

ERROR

(node:17164) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.> getCompilationHooks(compilation).loader (Use node --trace-deprecation ... to show where the warning was created)

ERROR

(node:17164) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated. BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation. Do changes to assets earlier, e. g. in Compilation.hooks.processAssets. Make sure to select an appropriate stage from Compilation.PROCESSASSETS_STAGE*.

I have drilled down a bit and found that cause of the problem was a deprecated webpack-assets-manifest dependency.

webpack-assets-manifest is compatible with webpack v5 as described here

Steps to reproduce

  • Create a project with gatsby v3
  • Add gatsby-plugin-netlify
  • run npm run build

Environment

System: OS: Windows 10 10.0.19042 CPU: (8) x64 Intel® Core™ i7-8550U CPU @ 1.80GHz Binaries: Node: 14.15.1 - C:\Program Files\nodejs\node.EXE npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.423.0), Chromium (88.0.705.81) npmPackages: gatsby: ^3.0.1 => 3.0.1 gatsby-plugin-google-analytics: ^3.0.0 => 3.0.0 gatsby-plugin-image: ^1.0.0 => 1.0.0 gatsby-plugin-manifest: ^3.0.0 => 3.0.0 gatsby-plugin-mdx: ^2.0.0 => 2.0.0 gatsby-plugin-netlify: ^3.0.0 => 3.0.0 gatsby-plugin-offline: ^4.0.0 => 4.0.0 gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0 gatsby-plugin-robots-txt: ^1.5.5 => 1.5.5 gatsby-plugin-sharp: ^3.0.0 => 3.0.0 gatsby-plugin-sitemap: ^3.0.0 => 3.0.0 gatsby-plugin-styled-components: ^4.0.0 => 4.0.0 gatsby-remark-autolink-headers: ^3.0.0 => 3.0.0 gatsby-remark-copy-linked-files: ^3.0.0 => 3.0.0 gatsby-remark-embedder: ^4.1.0 => 4.1.0 gatsby-remark-images: ^4.0.0 => 4.0.0 gatsby-remark-prismjs: ^4.0.0 => 4.0.0 gatsby-source-filesystem: ^3.0.0 => 3.0.0 gatsby-transformer-sharp: ^3.0.0 => 3.0.0

I would be happy to submit a PR if needed 🚀

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:12
  • Comments:20 (17 by maintainers)

github_iconTop GitHub Comments

8reactions
piehcommented, Mar 15, 2021

For folks that want workaround right now - if you use yarn you can add:

"resolutions": {
  "webpack-assets-manifest": "5.0.1"
}

to your package.json to force yarn to install that instead of what plugin has specified right now (unfortunaly there is no reliable equivalent workaround in npm)

4reactions
dsebastiencommented, Sep 14, 2021

I’ve tried the above workaround without success, unfortunately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Builds constantly killed with exit code 137 - Support
It seems that the plugin has been deprecated since we introduced it. It appears to have been replaced by @netlify/plugin-gatsby - npm (Essential ......
Read more >
Gatsby 5 upgrade error - Netlify Support Forums
I'm getting a build error on Netlify that I do not get in my local environment. I've added NODE_VERSION as an environment variable...
Read more >
Gatsby Build Error "TypeError: Unexpected response from ...
Hello, I'm trying to get a site deployed and just catching up on the new build/deploy settings but they are not making sense....
Read more >
Error when importing a custom font - Netlify Support Forums
Hi, I have a website that is built using Gatsby. I am trying to use the 'verveine' font on the site. I had...
Read more >
Netlify missing latest yarn versions? Yarn 3.2.X - Support
All Netlify builds using the Xenial build image will begin failing in the week ... "gatsby-plugin-netlify-cms > @soda/friendly-errors-webpack-plugin@1.8.1" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found