microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.72k stars 12.45k forks source link

Having issues with ts throwing me errors in my Nx repo using TS V5.2.2 #56406

Closed Roboromeo1 closed 11 months ago

Roboromeo1 commented 11 months ago

πŸ”Ž Search Terms

βœ— nx build client --verbose

nx run client:build:production

(node:41284) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) info - Skipping linting info - Checking validity of types ...

NX Maximum call stack size exceeded

RangeError: Maximum call stack size exceeded at new NodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:45676:21) at getNodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:47097:56) at getResolvedSymbol (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:67153:21) at checkIdentifier (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:69385:22) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77867:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34) at checkNonNullExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72124:31) at checkPropertyAccessExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72203:164) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77906:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34)

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

NX Running target build for project client failed

πŸ•— Version & Regression Information

⏯ Playground Link

No response

πŸ’» Code

// Your code here

πŸ™ Actual behavior

nx build client --verbose

nx run client:build:production

(node:41284) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) info - Skipping linting info - Checking validity of types ...

NX Maximum call stack size exceeded

RangeError: Maximum call stack size exceeded at new NodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:45676:21) at getNodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:47097:56) at getResolvedSymbol (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:67153:21) at checkIdentifier (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:69385:22) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77867:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34) at checkNonNullExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72124:31) at checkPropertyAccessExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72203:164) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77906:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34)

πŸ™‚ Expected behavior

nx build client --verbose

nx run client:build:production

(node:41284) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) info - Skipping linting info - Checking validity of types ...

NX Maximum call stack size exceeded

RangeError: Maximum call stack size exceeded at new NodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:45676:21) at getNodeLinks (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:47097:56) at getResolvedSymbol (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:67153:21) at checkIdentifier (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:69385:22) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77867:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34) at checkNonNullExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72124:31) at checkPropertyAccessExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:72203:164) at checkExpressionWorker (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77906:18) at checkExpression (/Users/aram/src/digital-forms-v3/node_modules/typescript/lib/typescript.js:77822:34)

Additional information about the issue

No response

fatcerberus commented 11 months ago

Your expected behavior is... to still get the crash?

At any rate you didn't properly fill out the bug report template (you just spammed some terminal output 3 times - please don't do that, once is sufficient) and you're most likely going to be asked to provide a repro.

Roboromeo1 commented 11 months ago

solved it worked when i did node --max-old-space-size=8192 ./node_modules/.bin/nx build client --verbose

Roboromeo1 commented 11 months ago

increasing my memory to 8 worked for me node --max-old-space-size=8192 ./node_modules/.bin/nx build client --verbose