Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when installing hasura-cli #116

Open
tictaqqn opened this issue Mar 25, 2024 · 15 comments
Open

Error when installing hasura-cli #116

tictaqqn opened this issue Mar 25, 2024 · 15 comments

Comments

@tictaqqn
Copy link

tictaqqn commented Mar 25, 2024

When running npm install -g hasura-cli, the errors below are shown and hasura-cli won't be installed.
I doubt it is caused by the release at 2:10UTC March 25 (version: 2.28.0).

npm ERR! code 1
npm ERR! path /opt/hostedtoolcache/node/20.11.1/x64/lib/node_modules/hasura-cli
npm ERR! command failed
npm ERR! command sh -c node dist/index.js
npm ERR! node:internal/modules/cjs/loader:1147
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/opt/hostedtoolcache/node/20.11.1/x64/lib/node_modules/hasura-cli/dist/index.js'
npm ERR!     at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
npm ERR!     at Module._load (node:internal/modules/cjs/loader:985:27)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
npm ERR!     at node:internal/main/run_main_module:28:49 {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: []
npm ERR! }
npm ERR! 
npm ERR! Node.js v20.11.1

OS: Linux (GitHub Actions) / Mac
Node version: 20.11.1

@Destreyf
Copy link

I ran into this issue under node 18 as well, my solution was to roll back to the last version (2.36.1).

@zwily
Copy link

zwily commented Mar 25, 2024

Should we be concerned that 2.38 was pushed to npm, but not github?

@tictaqqn
Copy link
Author

I'm not sure how 2.38 was published. Does anyone know about it?

@sandeep17sf
Copy link

same error

@oren-nonamesecurity
Copy link

Same here, too many new versions yesterday, seems odd.

image

@oren-nonamesecurity
Copy link

@bkniffler
Copy link

Same same, the dist folder is missing in the NPM package

@Jeck-Sparrow-5
Copy link

same here, someone have a solution?

@adrianwix
Copy link

@jjangga0214 Some help here?

@Destreyf
Copy link

same here, someone have a solution?

The only solution is to roll back to an older version.

@Nexitisyo
Copy link

Nexitisyo commented Apr 30, 2024

Same here, too many new versions yesterday, seems odd.

That is probably caused by updating directly via the CLI (hasura update-cli).
My current approach is installing an older version, like @Destreyf already said, and then updating it via CLI

e.g.,

npm i -g hasura-cli@2.36.1
hasura update-cli

@andoks
Copy link

andoks commented Apr 30, 2024

Same here, too many new versions yesterday, seems odd.

That is probably caused by updating directly via the CLI (hasura update-cli). My current approach is installing an older version, like @Destreyf already said, and then updating it via CLI

e.g.,

npm i -g hasura-cli@2.36.1 hasura update-cli

I find the whole point of the package to be able to pin the exact version of the cli tool to the same as I use for the hasura server.

While using the update-cli subcommand may be a workaround to get a newer version of the CLI going, it mostlye defeats the point of the npm package.

@zohaibadnan137
Copy link

Is this issue still not resolved?

@Destreyf
Copy link

Unfortunately it's not resolved, I accidentially updated this package and it broke my cli again.

@lkuich
Copy link

lkuich commented Jul 9, 2024

I'm still having this issue as of July, almost 3 months since this issue was opened. This seems like a straightforward solution, are we still maintaining this package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests