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.

Deprecation warnings failing Gatsby development server to start

See original GitHub issue

Running gatsby develop fails with deprecations warnings traced to react-refresh-webpack-plugin (traced using node --trace-deprecation ./node_modules/gatsby/dist/bin/gatsby develop).

Error messages:

success Caching HTML renderer compilation - 0.006s

 ERROR 

(node:8481) [DEP_WEBPACK_MAIN_TEMPLATE_OUTPUT_OPTIONS] DeprecationWarning:
MainTemplate.outputOptions is deprecated (use Compilation.outputOptions instead)
    at /Users/me/project-root/web/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/i
ndex.js:134:60
    at Hook.eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_mod
ules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:104:1)
    at Hook.CALL_DELEGATE [as _call]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/Users/me/project-root/web/node_modules/gatsby/node_modul
es/webpack/lib/Compiler.js:1034:26)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Compiler.j
s:1076:29
    at Hook.eval [as callAsync] (eval at create (/Users/me/project-root/web/node_modules/
gatsby/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/Users/me/project-root/web/node_modules/gatsby/node_modules/webp
ack/lib/Compiler.js:1071:28)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Watching.j
s:188:19
    at _next1 (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_module
s/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_modules/
tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)


 ERROR 

(node:8481) [DEP_WEBPACK_MAIN_TEMPLATE_REQUIRE] DeprecationWarning: MainTemplate.hooks.require
 is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderRequire instead)
    at /Users/me/project-root/web/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/i
ndex.js:135:52
    at Hook.eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_mod
ules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:104:1)
    at Hook.CALL_DELEGATE [as _call]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/Users/me/project-root/web/node_modules/gatsby/node_modul
es/webpack/lib/Compiler.js:1034:26)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Compiler.j
s:1076:29
    at Hook.eval [as callAsync] (eval at create (/Users/me/project-root/web/node_modules/
gatsby/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/Users/me/project-root/web/node_modules/gatsby/node_modules/webp
ack/lib/Compiler.js:1071:28)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Watching.j
s:188:19
    at _next1 (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_module
s/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_modules/
tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)


 ERROR 

(node:8481) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning:
Compilation.hooks.normalModuleLoader was moved to
NormalModule.getCompilationHooks(compilation).loader
    at getNormalModuleLoader (/Users/me/project-root/web/node_modules/gatsby/node_modules
/webpack/lib/Compilation.js:383:39)
    at Object.get normalModuleLoader [as normalModuleLoader] (/Users/me/project-root/web/
node_modules/gatsby/node_modules/webpack/lib/Compilation.js:816:12)
    at /Users/me/project-root/web/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/i
ndex.js:212:31
    at Hook.eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_mod
ules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:104:1)
    at Hook.CALL_DELEGATE [as _call]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:14:14)
    at Compiler.newCompilation (/Users/me/project-root/web/node_modules/gatsby/node_modul
es/webpack/lib/Compiler.js:1034:26)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Compiler.j
s:1076:29
    at Hook.eval [as callAsync] (eval at create (/Users/me/project-root/web/node_modules/
gatsby/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync]
(/Users/me/project-root/web/node_modules/gatsby/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.compile (/Users/me/project-root/web/node_modules/gatsby/node_modules/webp
ack/lib/Compiler.js:1071:28)
    at /Users/me/project-root/web/node_modules/gatsby/node_modules/webpack/lib/Watching.j
s:188:19
    at _next1 (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_module
s/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at eval (eval at create (/Users/me/project-root/web/node_modules/gatsby/node_modules/
tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

Output from gatsby info:

  System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.16.0 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 91.0.4472.77
    Firefox: 86.0.1
    Safari: 14.1.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
pmmmwhcommented, Jul 7, 2021

We are talking about this privately at the moment, but when there is something to share I’ll update here.

I’m also going to output a warning instead of making the socket throw so at least the build would work but the overlay would probably not work as expected.

3reactions
pmmmwhcommented, Jul 2, 2021

Hey! Thanks for reporting this issue - I am actually fully aware of this and have reached out to the maintainers of Gatsby so we can collaboratively get this fixed there 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Common Errors - Gatsby
This guide is meant as a reference for common errors that have tripped up other Gatsby users. Problems with the cache. Running a...
Read more >
Error 11903 when developing first gatsby project
I solved my problem by renaming folders in the path to the project directory to use only ASCII characters. I see you had...
Read more >
Strict Mode - React
StrictMode currently helps with: Identifying components with unsafe lifecycles; Warning about legacy string ref API usage; Warning about deprecated findDOMNode ...
Read more >
Gatsby app deployment fails. Local build works - Support
Site: https://www.software-express.de/ See: https://github.com/apps-360/site-search-360-react/issues/4 11:25:28 AM: Build ready to start ...
Read more >
Shopify Warning on API Deprecation : r/gatsbyjs - Reddit
I am currently getting an API Deprecation warning on my Gatsby site pulling from Shopify. I updated the on-site references a while ago ......
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