[BUG] Typescript: Maximum call stack size exceeded
See original GitHub issueDescribe the bug
Everytime i will run the npx @shopware-pwa/cli@latest
i will get an error that the Maximum call stack size exceeded.
Versions
PWA Version: 0.9.0
Shopware version: 6.4
tsconfig.json
{
"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
"esModuleInterop": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"~/*": ["./*"],
"@/*": ["./.shopware-pwa/source/*"]
},
"types": ["@types/node", "@nuxt/types"]
},
"exclude": ["node_modules"]
}
Stack trace
ERROR RangeError: Maximum call stack size exceeded 11:14:48
at Object.getCheckFlags (node_modules/typescript/lib/typescript.js:18470:27)
at addPropertyToElementList (node_modules/typescript/lib/typescript.js:48397:53)
at createTypeNodesFromResolvedType (node_modules/typescript/lib/typescript.js:48384:25)
at createTypeNodeFromObjectType (node_modules/typescript/lib/typescript.js:48190:35)
at visitAndTransformType (node_modules/typescript/lib/typescript.js:48138:34)
at createAnonymousTypeNode (node_modules/typescript/lib/typescript.js:48092:36)
at typeToTypeNodeHelper (node_modules/typescript/lib/typescript.js:47989:28)
at serializeReturnTypeForSignature (node_modules/typescript/lib/typescript.js:49181:24)
at signatureToSignatureDeclarationHelper (node_modules/typescript/lib/typescript.js:48586:42)
at addPropertyToElementList (node_modules/typescript/lib/typescript.js:48424:49)
Extra information
This error occurred after the update from 0.8.2 to 0.9.0 i donโt use any typescript in my code yet.
Steps
- npx @shopware-pwa/cli@0.9.0 dev
- is see the following response
Using theme: @shopware-pwa/default-theme 11:14:37
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Nuxt @ v2.15.6 โ
โ โ
โ โธ Environment: development โ
โ โธ Rendering: server-side โ
โ โธ Target: server โ
โ โ
โ Listening: http://0.0.0.0:3000/ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โน Preparing project for development 11:14:38
โน Initial build may take a while 11:14:38
โน Discovered Components: .nuxt/components/readme.md 11:14:38
โ Builder initialized 11:14:38
โ Nuxt files generated
โ Client
Compiled successfully in 31.11s
โ Server
Compiled successfully in 27.78s
ERROR RangeError: Maximum call stack size exceeded 11:14:48
at Object.getCheckFlags (node_modules/typescript/lib/typescript.js:18470:27)
at addPropertyToElementList (node_modules/typescript/lib/typescript.js:48397:53)
at createTypeNodesFromResolvedType (node_modules/typescript/lib/typescript.js:48384:25)
at createTypeNodeFromObjectType (node_modules/typescript/lib/typescript.js:48190:35)
at visitAndTransformType (node_modules/typescript/lib/typescript.js:48138:34)
at createAnonymousTypeNode (node_modules/typescript/lib/typescript.js:48092:36)
at typeToTypeNodeHelper (node_modules/typescript/lib/typescript.js:47989:28)
at serializeReturnTypeForSignature (node_modules/typescript/lib/typescript.js:49181:24)
at signatureToSignatureDeclarationHelper (node_modules/typescript/lib/typescript.js:48586:42)
at addPropertyToElementList (node_modules/typescript/lib/typescript.js:48424:49)
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to overcome maximum call stack size exceeded in ...
I've implemented snapshot, implemented error handling, my promises aren't nested. Yet the error continues HELP!! get _assessmentData():ย ...
Read more >Maximum Call Stack Size Exceeded (Typescript Error) - Medium
Most browsers will execute functions inside functions until their default call stack limit is exceeded.
Read more >RangeError: Maximum call stack size exceeded #50348
I've confirmed the code crashes tsc on the latest nightly version, and works on 4.5.5 . It appears to be caused by importing...
Read more >Maximum call stack size exceeded Error in TypeScript
The "RangeError: Maximum call stack size exceeded" occurs when a function is being called so many times that the invocations exceed the call...
Read more >Deal With โMaximum Call Stack Size Exceededโ in JavaScript
Dealing with the โMaximum call stack size exceededโ error is easy. All you have to do is avoid using the spread operator or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mkucmus The problem was in the SfTable component from storefront-ui.
This code above was returning in an exception
Object.defineProperty called on non-object
but in the typescript compiler it was not throwing this message. I will throw in issue in their repo.thanks for bringing it up; looks like the problem with dependencies, please try the following steps:
package.json
yarn upgrade
yarn shopware-pwa init
yarn dev
(do not use npx for anything else than init)what else could help if not this:
node_modules
directory andyarn.lock
filenpx @shopware-pwa/cli init
if nothing from above works please show us your package.json and yarn.lock file