Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack size exceeded -> In SourceMapDevToolPlugin/ Tappable #16658

Open
tmcconechy opened this issue Jan 20, 2023 · 5 comments
Open

Comments

@tmcconechy
Copy link

tmcconechy commented Jan 20, 2023

Bug report

What is the current behavior?

When running the dev-server in live-reload mode and changing files the dev server will immediately die with this stack trace when changing a file. With this stack trace:

RangeError: Maximum call stack size exceeded
    at eval (eval at create (/Users/tim.mcconechy/Dev/enterprise-wc/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/webpack/lib/SourceMapDevToolPlugin.js:549:10
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/neo-async/async.js:2830:7
    at Object.each (/Users/tim.mcconechy/Dev/enterprise-wc/node_modules/neo-async/async.js:2857:9)
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/webpack/lib/SourceMapDevToolPlugin.js:384:17
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/neo-async/async.js:2830:7
    at Object.each (/Users/tim.mcconechy/Dev/enterprise-wc/node_modules/neo-async/async.js:2857:9)
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/webpack/lib/SourceMapDevToolPlugin.js:207:15
    at /Users/tim.mcconechy/Dev/enterprise-wc/node_modules/webpack/lib/Compilation.js:501:18
    at Hook.eval [as callAsync] (eval at create (/Users/tim.mcconechy/Dev/enterprise-wc/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)

If the current behavior is a bug, please provide the steps to reproduce.

Can see it in our repo

  • clone https://github.com/infor-design/enterprise-wc
  • edit webpack.config.dev.js so that devtool: 'cheap-module-source-map' (not eval-source-map as it is now as a workaround)
  • nvm use (node 18 or 16 so not a node issue)
  • npm i
  • npm run start
  • change any file like src/components/ids-about/ids-about.ts (remove a ;) and press save
  • stack trace will appear

What is the expected behavior?
This seems to be a new issue with something introduced recently in the npm ecosystem, as it happens on old and new versions of our project with various versions of the dependencies.

devtool seems related ->https://webpack.js.org/configuration/devtool/
I also changed some of these options in webpack.config.dev.js and the "eval" ones seem to work...

Seems also to happen with more files like our repo has. We can run in "filter mode" with less entries and the issue does not occur npm --components=about run start

Other relevant information:
webpack version: 5.75.0
Node.js version: 18
Operating System: Mac
Additional tools:

@alexander-akait
Copy link
Member

Looks like some source maps is really deep to merge... I will look deeply soon

@TheLarkInn
Copy link
Member

@tmcconechy would you be willing to test this on the latest version of webpack?

@tmcconechy
Copy link
Author

tmcconechy commented Apr 19, 2023

@TheLarkInn no it does not seem to be fixed on the latest. I added one step as you need to make devTool='cheap-module-source-map' - we have a workaround in place with eval-cheap-module-source-map but this isnt good as it requires us to ignore CSP

@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Priority - Medium
Development

No branches or pull requests

5 participants