fauna-labs / fauna-schema-migrate

The Fauna Schema Migrate tool helps you set up Fauna resources as code and perform schema migrations.
MIT No Attribution
88 stars 11 forks source link

Getting errors after installing #104

Closed fabianhijlkema closed 2 years ago

fabianhijlkema commented 3 years ago

Following the first part of the documentation and later video, I keep getting a certain error preventing me from working with this tool.

█▀▀ ▄▀█ █ █ █▄ █ ▄▀█ 
 █▀  █▀█ █▄█ █ ▀█ █▀█   Schema Migrate 2.1.5
 ──────────────────────────────────────────────────
 Executing command: Get the current state of cloud and local migrations

RangeError: Invalid string length
    at String.repeat (<anonymous>)
    at Output.get (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/output.js:26:29)
    at Object.exports.default (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/renderer.js:35:58)
    at Object.Ink.onRender [as onImmediateRender] (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/ink.js:49:78)
    at resetAfterCommit (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/reconciler.js:37:26)
    at commitRootImpl (/Users/fabianhijlkema/Desktop/fsm/node_modules/react-reconciler/cjs/react-reconciler.development.js:15066:5)
    at unstable_runWithPriority (/Users/fabianhijlkema/Desktop/fsm/node_modules/scheduler/cjs/scheduler.development.js:697:12)
    at runWithPriority (/Users/fabianhijlkema/Desktop/fsm/node_modules/react-reconciler/cjs/react-reconciler.development.js:1881:10)
    at commitRoot (/Users/fabianhijlkema/Desktop/fsm/node_modules/react-reconciler/cjs/react-reconciler.development.js:14920:3)
    at finishSyncRender (/Users/fabianhijlkema/Desktop/fsm/node_modules/react-reconciler/cjs/react-reconciler.development.js:14324:3)
[React Hookstore] The error above was caused while React Hookstore was trying to call setState on a component. If you think this is a bug with React Hookstore, please file an issue https://github.com/jhonnymichel/react-hookstore/issues/new

/Users/fabianhijlkema/Desktop/fsm/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

RangeError: Invalid string length
    at String.repeat (<anonymous>)
    at Output.get (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/output.js:26:29)
    at Object.exports.default (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/renderer.js:35:58)
    at Ink.onRender (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/ink.js:49:78)
    at Ink.unmount (/Users/fabianhijlkema/Desktop/fsm/node_modules/ink/build/ink.js:175:14)
    at EventEmitter.emit (node:events:365:28)
    at emit (/Users/fabianhijlkema/Desktop/fsm/node_modules/signal-exit/index.js:87:13)
    at processEmit [as emit] (/Users/fabianhijlkema/Desktop/fsm/node_modules/signal-exit/index.js:170:7)
Fabians-MBP:fsm fabianhijlkema$ npx fauna-schema-migrate run

While installing the fauna-schema-migrate tool I got the following report which I assume is connected to the error.

Fabians-MBP:fsm fabianhijlkema$ npm install @fauna-labs/fauna-schema-migrate
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   react@">=16.8.2" from @fauna-labs/fauna-schema-migrate@2.1.5
npm WARN   node_modules/@fauna-labs/fauna-schema-migrate
npm WARN     @fauna-labs/fauna-schema-migrate@"*" from the root project
npm WARN   7 more (ink, ink-big-text, ink-divider, ink-gradient, ink-link, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.2" from ink-syntax-highlight@1.0.1
npm WARN node_modules/ink-syntax-highlight
npm WARN   ink-syntax-highlight@"^1.0.1" from @fauna-labs/fauna-schema-migrate@2.1.5
npm WARN   node_modules/@fauna-labs/fauna-schema-migrate

I've tried a few things that I hoped would solve the dependency issue, but no luck. I'm eager to try the tool out, so hopefully it is just a minor fix.

github-actions[bot] commented 3 years ago

Internal ticket number is LABS-72

Shadid12 commented 2 years ago

@fabianhijlkema could you please specify the following

rts-rob commented 2 years ago

Hi @fabianhijlkema - thanks for reporting and for your interest in Fauna!

We just pushed #107 which resolved issue #106 - I believe it may have also resolved this issue as well.

Can you try updating to v2.1.6 and letting us know whether it works?

If not, please also provide the information @Shadid12 requested.

fabianhijlkema commented 2 years ago

Hi @rts-rob @Shadid12 I updated my Node version from 16.0.0 to 16.0.13 which resolved my issue above, but introduced the issue described in #106. It works with the workaround mentioned in that discussion, but from my side #106 doesn't seem fixed without workaround. But was trying all of this quickly, so maybe I missed something.

Node version 16.0.13 NPM version 8.1.3 FSM version 2.1.6

rts-rob commented 2 years ago

Hi @fabianhijlkema - I can reproduce the same error with the exact same setup as you. Strange because it didn't appear in testing.

Since you mentioned the error above is closed, I'm going to close this issue and re-open #106.

Shadid12 commented 2 years ago

@fabianhijlkema please make sure you purge all your node_modules first. The following command will do the trick if you are on linux/mac

rm -rf node_modules

then do npm i

fabianhijlkema commented 2 years ago

@Shadid12 did just that, had no effect.

@rts-rob ok!