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 #163

Closed
tony19 opened this issue Feb 15, 2022 · 2 comments
Closed

Maximum call stack size exceeded #163

tony19 opened this issue Feb 15, 2022 · 2 comments

Comments

@tony19
Copy link

tony19 commented Feb 15, 2022

Webpack-based projects (including Vue CLI scaffolded projects, and Quasar projects) are failing with Maximum call stack size exceeded, starting from buildSourceMapTree() and infinitely recursing in build(). This seems to occur when building the source map.

Steps to reproduce:

  1. Scaffold a new Vue CLI project with:

     npx @vue/cli create --default my-vue-app
  2. Change into the source directory with:

    cd my-vue-app
  3. Start the webpack devserver:

    npm run serve
  4. Observe the error in the console.

Call stack
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:230)
build (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:206)
buildSourceMapTree (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:198)
remapping (/Users/tony/src/tmp/test-vue-app123/node_modules/@ampproject/remapping/dist/remapping.umd.js:273)
mergeSourceMap (/Users/tony/src/tmp/test-vue-app123/node_modules/@babel/core/lib/transformation/file/merge-map.js:19)
generateCode (/Users/tony/src/tmp/test-vue-app123/node_modules/@babel/core/lib/transformation/file/generate.js:75)
run (/Users/tony/src/tmp/test-vue-app123/node_modules/@babel/core/lib/transformation/index.js:55)
transform (/Users/tony/src/tmp/test-vue-app123/node_modules/@babel/core/lib/transform.js:25)
step (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:261)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:273)
async.call.result.err.err (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:223)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:189)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/@babel/core/lib/gensync-utils/async.js:74)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:113)
step (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:287)
 (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:273)
async.call.result.err.err (/Users/tony/src/tmp/test-vue-app123/node_modules/gensync/index.js:223)

Environment

  • @ampproject/remapping - 2.1.1
  • macOS Big Sur
  • Node 17
@tony19
Copy link
Author

tony19 commented Feb 15, 2022

A workaround is to configure Webpack's devtool to something other than eval or eval-source-map (e.g., you can pick eval-cheap-source-map):

Vue CLI 5.x:

// vue.config.js
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  configureWebpack: {
    devtool: 'eval-cheap-source-map',
  },
})

Vue CLI 4.x:

// vue.config.js
module.exports = {
  configureWebpack: {
    devtool: 'eval-cheap-source-map',
  },
}

@jridgewell
Copy link
Collaborator

Hi @tony19: This is fixed by babel/babel#14274, and released in Babel v7.17.4. Sorry for the breakage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants