Incompatible with latest version of Next.js
See original GitHub issueWhen using the latest version of next, the following error is thrown:
./pages/index.22C1ZZc.css:4:0
Module not found:
Can't resolve '[...]/node_modules/next/dist/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js'
null
Here’s a basic reproduction reproduction repository: TxHawks/style9-latest-next-repro
The 1st commit is a working example using Next v10.0.9
The 2nd commit breaks after an upgrade to latest Next (v10.2.3
)
The 3rd commit remains broken after upgrading next-transpile-modules to its latest version (v7.2.0
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Upgrade Guide - Next.js
Upgrade React version to latest Most applications already use the latest version of React, with Next. js 11 the minimum React version has...
Read more >Incompatible with next.js 12.2.0: "Invalid next.config.js ... - GitHub
When compiling with next.js 12.2.0, this warning is shown, even when an empty array is passed for the plugins parameter: warn - Invalid ......
Read more >Create-next-app fails nvm node 16 doesn't work - Stack Overflow
Trying to create a new next app with yarn create next-app . It fails with this error: error @eslint/eslintrc@1.0.5: The engine "node" is...
Read more >NextJS or Node Compatability Error - Cloudflare Community
I'm attempting to launch a pages application using NextJS from a git ... I have the latest version of each installed and am...
Read more >Error deploy next 12.1.5 - Netlify Support Forums
The build image you are using is running an outdated and incompatible version of Node.js. Using one of the methods outlined in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Created a pull request in next that fixes it.
Let’s see what they say
The plugin uses the Webpack loader and plugin bundled with Next.js.
getClientStyleLoader
returns the path to the loader and some options, which are stringified and are used to prefix the.css
import path as instructions for Webpack. It has different loaders for development and production, but we only use the production one. In addition to the loader, theMiniCssExtractPlugin
from Next.js is also added. Next.js bundles it’s plugins, and the error is thathotModuleReplacement.js
is not included. It’s possible that adding the file back is not enough, that some other changes will cause an issue, but it’s a good place to start. An alternative would be to stop using the bundled css handling and include theMiniCssExtractPlugin
directly, although that might cause other issues. The plugin should at least be compatible with Next.js 9.x and 10.x.You could ask in the Next.js repo and see if anyone there could offer any assistance.