[gatsby-plugin-netlify] depracated webpack-assets-manifest causing errors during build
See original GitHub issueDescription
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:
- Created 3 years ago
- Reactions:12
- Comments:20 (17 by maintainers)
Top GitHub Comments
For folks that want workaround right now - if you use
yarn
you can add: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)
I’ve tried the above workaround without success, unfortunately.