preact-cli icon indicating copy to clipboard operation
preact-cli copied to clipboard

preact build: INTERNAL ERROR: Maximum call stack size exceeded

Open sydev opened this issue 7 years ago • 1 comments

Do you want to request a feature or report a bug? Bug

What is the current behaviour? When I run preact build, I get the following error:

$ preact build
 Build  [=================== ] 95% (4.9s) emitting
 ssr-bundle.3577e.css ⏤  1.09 kB (+1.09 kB)
        ssr-bundle.js ⏤  13.8 kB (+13.8 kB)

✖ ERROR [internal]
INTERNAL ERROR: Maximum call stack size exceeded
stack trace:
RangeError: Maximum call stack size exceeded
    at getTypeOfFuncClassEnumModule (./node_modules/typescript/lib/typescript.js:39703:46)
    at getTypeOfSymbol (./node_modules/typescript/lib/typescript.js:39824:24)
    at getTypeFromJSDocValueReference (./node_modules/typescript/lib/typescript.js:42800:29)
    at getTypeReferenceType (./node_modules/typescript/lib/typescript.js:42782:33)
    at getTypeFromJSDocValueReference (./node_modules/typescript/lib/typescript.js:42815:32)
    at getTypeReferenceType (./node_modules/typescript/lib/typescript.js:42782:33)
    at getTypeFromJSDocValueReference (./node_modules/typescript/lib/typescript.js:42815:32)
    at getTypeReferenceType (./node_modules/typescript/lib/typescript.js:42782:33)
    at getTypeFromJSDocValueReference (./node_modules/typescript/lib/typescript.js:42815:32)
    at getTypeReferenceType (./node_modules/typescript/lib/typescript.js:42782:33)
✖ ERROR undefined

If the current behaviour is a bug, please provide the steps to reproduce. I have created a preact app with the following command: preact create default {appname} --yarn --git. After that I installed sass-loader@7 and node-sass to enable sass support.

What is the expected behaviour? No exceeded memory error.

If this is a feature request, what is motivation or use case for changing the behaviour? No

Please mention other relevant information. No other relevant information

Please paste the results of preact info here.


Environment Info:

  System:
    OS: macOS 10.15.1
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: 1.19.1 - ~/.yarn/bin/yarn
    npm: 6.13.1 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Browsers:
    Chrome: 78.0.3904.108
    Safari: 13.0.3
  npmPackages:
    preact: ^10.0.1 => 10.0.5
    preact-cli: ^3.0.0-rc.6 => 3.0.0-rc.6
    preact-render-to-string: ^5.1.0 => 5.1.1
    preact-router: ^3.0.0 => 3.1.0

sydev avatar Nov 24 '19 10:11 sydev

I fixed it by myself. The error came up because I used a tsconfig.json with the following content:

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "allowJs": true
  }
}

I´ve created this file to enable decorator support in unistore. But since preact-cli@3 the file seems to be superfluous, even more: it causes the build error. I just throw it away and everything works fine.

sydev avatar Nov 24 '19 10:11 sydev