Skip to content

'RangeError: Maximum call stack size exceeded ' when run build #3091

Closed
@hezhongfeng

Description

@hezhongfeng

Version

3.2.1

Reproduction link

Environment info

Node 10.14.1 / npm 6.4.1 / yarn 1.12.3 / win10

Steps to reproduce

When there are too many pages, will show this error.
Then I detele some router. it build work.
All routes use lazy-load components .I have test node8.x or 10.x and --max_old_space_size

What is expected?

build normal

What is actually happening?

$ cross-env NODE_ENV=production node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js build

-  Building for production...D:\example\3.2.1\node_modules\tapable\lib\HookCodeFactory.js:32
                                fn = new Function(
                                     ^

RangeError: Maximum call stack size exceeded
    at new Function (<anonymous>)
    at AsyncSeriesHookCodeFactory.create (D:\example\3.2.1\node_modules\tapable\lib\HookCodeFactory.js:32:10)
    at AsyncSeriesHook.compile (D:\example\3.2.1\node_modules\tapable\lib\AsyncSeriesHook.js:24:18)
    at AsyncSeriesHook._createCall (D:\example\3.2.1\node_modules\tapable\lib\Hook.js:24:15)
    at AsyncSeriesHook.lazyCompileHook [as callAsync] (D:\example\3.2.1\node_modules\tapable\lib\Hook.js:153:21)
    at source.tapAsync (D:\example\3.2.1\node_modules\enhanced-resolve\lib\ResultPlugin.js:16:26)
    at AsyncSeriesBailHook.eval [as callAsync] (eval at create (D:\example\3.2.1\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)
    at Resolver.doResolve (D:\example\3.2.1\node_modules\enhanced-resolve\lib\Resolver.js:235:16)
    at resolver.getHook.tapAsync (D:\example\3.2.1\node_modules\enhanced-resolve\lib\NextPlugin.js:16:13)
    at AsyncSeriesBailHook.eval [as callAsync] (eval at create (D:\example\3.2.1\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:7:1)
    at Resolver.doResolve (D:\example\3.2.1\node_modules\enhanced-resolve\lib\Resolver.js:235:16)
    at fs.stat (D:\example\3.2.1\node_modules\enhanced-resolve\lib\FileExistsPlugin.js:29:14)
    at process.nextTick (D:\example\3.2.1\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:73:15)
    at process._tickCallback (internal/process/next_tick.js:61:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs team reproWe acknowledged your report and will soon try to reproduce it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions