Skip to content

Webpack 5 still shows deprecation warnings with Next 10 #18758

@nicholaschiang

Description

@nicholaschiang

Bug report

Describe the bug

Just installed Next 10 and upgraded to Webpack 5 (added a Yarn resolution to package.json) and I'm still getting deprecation warnings when building:

Loaded env from /home/nchiang/repos/tutorbook/.env.production.local
Loaded env from /home/nchiang/repos/tutorbook/.env.local
Loaded env from /home/nchiang/repos/tutorbook/.env.production
Loaded env from /home/nchiang/repos/tutorbook/.env
info  - Using external babel configuration from /home/nchiang/repos/tutorbook/babel.config.js
(node:24522) [DEP_WEBPACK_MODULE_UPDATE_HASH] DeprecationWarning: Module.updateHash: Use new ChunkGraph API
(node:24522) [DEP_WEBPACK_MAIN_TEMPLATE_OUTPUT_OPTIONS] DeprecationWarning: MainTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)
(node:24522) [DEP_WEBPACK_MAIN_TEMPLATE_RENDER_CURRENT_HASH_CODE] DeprecationWarning: MainTemplate.renderCurrentHashCode is deprecated (use RuntimeGlobals.getFullHash runtime function instead)
(node:24522) [DEP_WEBPACK_MAIN_TEMPLATE_GET_ASSET_PATH] DeprecationWarning: MainTemplate.getAssetPath is deprecated (use Compilation.getAssetPath instead)
(node:24522) [DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE_FN] DeprecationWarning: MainTemplate.requireFn is deprecated (use "__webpack_require__")
Webpack Bundle Analyzer saved report to /home/nchiang/repos/tutorbook/.next/analyze/client.html
Webpack Bundle Analyzer saved stats file to /home/nchiang/repos/tutorbook/.next/stats.json
info  - Creating an optimized production build ..<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (188kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (127kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (173kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (185kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Clone this repository.
  2. Follow these instructions to install deps, etc.
  3. Run yarn build:analyze from the repository root.
  4. See error

Expected behavior

There should be no deprecation warnings when using Next 10 with Webpack 5.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: PopOS 20.10
  • Version of Next.js: 10.0.0
  • Version of Node.js: 12.18.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions