Open bernatvadell opened 2 years ago
@bernatvadell I get this exact same error, but only if I run it in VSCode. If I use WindowsTerminal to open my Ubuntu shell and run it from there, it works.
@bernatvadell @jrobber Hi! Thank you for reporting the issue! May I ask if this happens with the latest version? (I personally don't use/have a Windows machine (though I may be able to use VM if necessary), so I'd like you to test if possible)
Thanks!
I am also curious whether npx hasura-cli metadata export
and npx hasura metadata export
can have different results.
I 'guess', theoretically, some of these scenarios may be possible. (I don't know if CLI can be executed both on WSL and Windows regardless of how it was installed.)
@bernatvadell @jrobber Would you advise which are possible and which you can test?
Thanks!
'1'. Install package manager(e.g. npm) on Windows (not WSL),
npm install
on Windows shell (command prompt of CMD or Powershell), npx hasura-cli metadata export
npx hasura metadata export
npm install
on WSL npx hasura-cli metadata export
npx hasura metadata export
'2'. Install package manager(e.g. npm) on WSL(not Windows),
npm install
on Windows shell (command prompt of CMD or Powershell), npx hasura-cli metadata export
npx hasura metadata export
npm install
on WSL npx hasura-cli metadata export
npx hasura metadata export
@jrobber
I get this exact same error, but only if I run it in VSCode. If I use WindowsTerminal to open my Ubuntu shell and run it from there, it works.
Maybe, that's because VSCode changes the environment, like by adding NODE_OPTIONS
or so. Let me know if you know/find some information!
I had the same issue with applying metadata to the GraphQL engine when running from VSCode's integrated terminal. When run from the standard macOS terminal it worked fine. I was running Hasura commands from VSCode without any issues just until recently so maybe it's connected to the VSCode version (it automatically installs updates on my machine)?
VSCode version: 1.73.1 Hasura CLI version: 2.6.1
Had the same issue. I'm running Visual Studio Code Version 1.91.0.
Disabling Auto Attach works as a workaround for me. To re-enable it, execute the Debug: Toggle Auto Attach command from the Command Palette and set it to whatever it was previously. Choosing Temporarily disable auto attach in this session to disable it temporarily does not work.
Don't forget to relaunch the integrated terminal for the disabling to take effect.
For me Auto Attach being enabled, or temporarily disabled, adds the following to my environment:
$ echo $NODE_OPTIONS
--require /home/user/.config/Code/User/workspaceStorage/ee7680bfac58bb7fb0b18d6be57f57bb/ms-vscode.js-debug/bootloader.js
Which seems, to me, to be the cause somehow. When Auto Attach is disabled NODE_OPTIONS
is empty.
Linux 6.9.7 Hasura CLI: 2.40.2 Node: 22.2.0 VSCode: 1.91.0
Hi!
Im trying to configure hasura console to manage migrations.
I've tested the binary for linux and the npm package, but the error is the same.
Enviroment