Skip to content

npx zenstack generate doesn't work, maximum call stack errors.  #1917

Open
@daveycodez

Description

I tried to add ZenStack to my existing NextJS project. It's brand new with create-next-app@latest.

All I do is run these 2 commands and it fails.

npx zenstack@latest init
Installing package "[email protected]" with npm

added 121 packages, and audited 856 packages in 5s

200 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Installing package "@zenstackhq/[email protected]" with npm

up to date, audited 856 packages in 1s

200 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Sample model generated at: schema.zmodel

Please check the following guide on how to model your app:
    https://zenstack.dev/#/modeling-your-app.

Project initialized successfully!
npx zenstack generate

An unexpected error occurred:
 RangeError: Maximum call stack size exceeded
    at Rule.get (/Users/david/Developer/new-tech/node_modules/langium/node_modules/@chevrotain/gast/lib/src/model.js:46:23)
    at NonTerminal.get (/Users/david/Developer/new-tech/node_modules/langium/node_modules/@chevrotain/gast/lib/src/model.js:75:44)
    at block (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:68)
    at atom (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:130:16)
    at /Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:87
    at arrayMap (/Users/david/Developer/new-tech/node_modules/lodash/_arrayMap.js:16:21)
    at map (/Users/david/Developer/new-tech/node_modules/lodash/map.js:50:10)
    at block (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:61)
    at atom (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:130:16)
    at /Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:87

An unexpected error occurred:
 RangeError: Maximum call stack size exceeded
    at Rule.get (/Users/david/Developer/new-tech/node_modules/langium/node_modules/@chevrotain/gast/lib/src/model.js:46:23)
    at NonTerminal.get (/Users/david/Developer/new-tech/node_modules/langium/node_modules/@chevrotain/gast/lib/src/model.js:75:44)
    at block (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:68)
    at atom (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:130:16)
    at /Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:87
    at arrayMap (/Users/david/Developer/new-tech/node_modules/lodash/_arrayMap.js:16:21)
    at map (/Users/david/Developer/new-tech/node_modules/lodash/map.js:50:10)
    at block (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:61)
    at atom (/Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:130:16)
    at /Users/david/Developer/new-tech/node_modules/chevrotain-allstar/lib/atn.js:185:87

I'm on macOS if that matters.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions