BUG: ReactFreshWebpackPlugin - additionalTreeRuntimeRequirements doesn't exist in compilation hooks
See original GitHub issueTried creating a new project using create-nx-workspace
and choosing Next.js
as an option. After running npm start
the script failed with an exception Cannot read property 'tap' of undefined
. After a bit of debugging found the exact line that was causing the error.
Credit to @ViableClanMember for leading me to try nx
and stumble on this bug.
Running -
root@eef1066ee246:/app/viable-saas# npm start
> viable-saas@0.0.0 start
> nx serve
> nx run viable-saas:serve
info - automatically enabled Fast Refresh for 1 custom loader
Cannot read property 'tap' of undefined
npm ERR! code 1
npm ERR! path /app/viable-saas
npm ERR! command failed
npm ERR! command sh -c nx serve
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-14T23_44_10_516Z-debug.log
The undefined
object from here -
Debug file
# cat /root/.npm/_logs/2021-01-14T23_44_10_516Z-debug.log
0 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
1 info using npm@7.3.0
2 info using node@v15.5.1
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/app/viable-saas/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/root/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 6ms
19 verbose npm-session 03650f10b6fedc4d
20 timing npm:load Completed in 15ms
21 timing command:run-script Completed in 4569ms
22 timing command:start Completed in 4571ms
23 verbose stack Error: command failed
23 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
23 verbose stack at ChildProcess.emit (node:events:376:20)
23 verbose stack at maybeClose (node:internal/child_process:1063:16)
23 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
24 verbose pkgid viable-saas@0.0.0
25 verbose cwd /app/viable-saas
26 verbose Linux 5.8.0-36-generic
27 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
28 verbose node v15.5.1
29 verbose npm v7.3.0
30 error code 1
31 error path /app/viable-saas
32 error command failed
33 error command sh -c nx serve
34 verbose exit 1
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
pmmmwh/react-refresh-webpack-plugin/lib/index.js:236 ...
@pmmmwh/react-refresh-webpack-plugin/lib/index.js:236 compilation.hooks.additionalTreeRuntimeRequirements.tap( ^ TypeError: Cannot read properties of undefined ...
Read more >Webpack5 + react-refresh-webpack-plugin does not work
I have been trying to setup fast refreshing and hot reloading in react with `webpack5 following the documentation for react-refresh-webpack- ...
Read more >@pmmmwh/react-refresh-webpack-plugin - Package Manager
@pmmmwh/react-refresh-webpack-plugin ... An EXPERIMENTAL Webpack plugin to enable "Fast Refresh" (also previously known as Hot Reloading) for React components.
Read more >HMR and Hot Reloading with the webpack-dev-server
Speedy compilation of client side assets; Optional HMR which means that the page will ... Client Side rendering with HMR using react-refresh-webpack-plugin.
Read more >Fast Refresh | Gatsby
Compile Errors; GraphQL Errors; Runtime Errors; getServerData Error. Limitations; Tips. React Hooks. Fast Refresh is an implementation of Hot Reloading with ...
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 Free
Top 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
Quite certain this was already fixed on
yarn add next@canary
, please try it out and report back.This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.