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

Getting a husky error when trying to install the CLI. #251

Open
johnnymatthews opened this issue Oct 8, 2024 · 1 comment
Open

Getting a husky error when trying to install the CLI. #251

johnnymatthews opened this issue Oct 8, 2024 · 1 comment
Assignees

Comments

@johnnymatthews
Copy link
Contributor

Both me and @Jordy2k are hitting this error:

$ npm install --global @entropyxyz/cli

npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: viem@2.21.19
npm warn Found: typescript@4.9.5
npm warn node_modules/@entropyxyz/cli/node_modules/typescript
npm warn   peerOptional typescript@">=5.0.4" from abitype@1.0.6
npm warn   node_modules/@entropyxyz/cli/node_modules/viem/node_modules/abitype
npm warn     abitype@"1.0.6" from viem@2.21.19
npm warn     node_modules/@entropyxyz/cli/node_modules/viem
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional typescript@">=5.0.4" from viem@2.21.19
npm warn node_modules/@entropyxyz/cli/node_modules/viem
npm warn   viem@"^2.7.8" from @entropyxyz/cli@0.0.3
npm warn   node_modules/@entropyxyz/cli
npm warn
npm warn Conflicting peer dependency: typescript@5.6.2
npm warn node_modules/typescript
npm warn   peerOptional typescript@">=5.0.4" from viem@2.21.19
npm warn   node_modules/@entropyxyz/cli/node_modules/viem
npm warn     viem@"^2.7.8" from @entropyxyz/cli@0.0.3
npm warn     node_modules/@entropyxyz/cli
npm warn deprecated @substrate/connect@0.8.8: versions below 1.x are no longer maintained
npm error code 127
npm error path /home/johnny/.nvm/versions/node/v22.9.0/lib/node_modules/@entropyxyz/cli
npm error command failed
npm error command sh -c husky
npm error sh: line 1: husky: command not found
npm error A complete log of this run can be found in: /home/johnny/.npm/_logs/2024-10-08T20_29_55_778Z-debug-0.log

Install fails, complaining something about husky.

@johnnymatthews
Copy link
Contributor Author

Just tried recreating this error on a fresh Ubuntu VM. Here's what I ran:

# Install NVM.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# Install latest LTS Node version.
nvm install node

# Install Entropy CLI
npm install --global @entropyxyz/cli

Here's what I got back:

❯ vagrant ssh
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-116-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Sat Oct 12 03:50:46 PM UTC 2024

  System load:           0.44
  Usage of /:            12.1% of 30.34GB
  Memory usage:          12%
  Swap usage:            0%
  Processes:             175
  Users logged in:       0
  IPv4 address for eth0: 10.0.2.15
  IPv6 address for eth0: fd00::a00:27ff:fec8:9864


This system is built by the Bento project by Chef Software
More information can be found at https://github.com/chef/bento

Use of this system is acceptance of the OS vendor EULA and License Agreements.



vagrant@vagrant:~$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16563  100 16563    0     0  49461      0 --:--:-- --:--:-- --:--:-- 49589
=> Downloading nvm from git to '/home/vagrant/.nvm'
=> Cloning into '/home/vagrant/.nvm'...
remote: Enumerating objects: 378, done.
remote: Counting objects: 100% (378/378), done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 378 (delta 43), reused 163 (delta 25), pack-reused 0 (from 0)
Receiving objects: 100% (378/378), 375.87 KiB | 1.59 MiB/s, done.
Resolving deltas: 100% (43/43), done.
* (HEAD detached at FETCH_HEAD)
  master
=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/vagrant/.bashrc
=> Appending bash_completion source string to /home/vagrant/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion



vagrant@vagrant:~$ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion



vagrant@vagrant:~$ nvm install node
Downloading and installing node v22.9.0...
Downloading https://nodejs.org/dist/v22.9.0/node-v22.9.0-linux-x64.tar.xz...
################################################################################ 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v22.9.0 (npm v10.8.3)
Creating default alias: default -> node (-> v22.9.0)



vagrant@vagrant:~$ npm --version
10.8.3



vagrant@vagrant:~$ npm install --global @entropyxyz/cli
npm warn ERESOLVE overriding peer dependency
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: viem@2.21.23
npm warn Found: typescript@4.9.5
npm warn node_modules/@entropyxyz/cli/node_modules/typescript
npm warn   peerOptional typescript@">=5.0.4" from abitype@1.0.6
npm warn   node_modules/@entropyxyz/cli/node_modules/viem/node_modules/abitype
npm warn     abitype@"1.0.6" from viem@2.21.23
npm warn     node_modules/@entropyxyz/cli/node_modules/viem
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional typescript@">=5.0.4" from viem@2.21.23
npm warn node_modules/@entropyxyz/cli/node_modules/viem
npm warn   viem@"^2.7.8" from @entropyxyz/cli@0.0.3
npm warn   node_modules/@entropyxyz/cli
npm warn
npm warn Conflicting peer dependency: typescript@5.6.3
npm warn node_modules/typescript
npm warn   peerOptional typescript@">=5.0.4" from viem@2.21.23
npm warn   node_modules/@entropyxyz/cli/node_modules/viem
npm warn     viem@"^2.7.8" from @entropyxyz/cli@0.0.3
npm warn     node_modules/@entropyxyz/cli
npm warn deprecated @substrate/connect@0.8.8: versions below 1.x are no longer maintained
npm error code 127
npm error path /home/vagrant/.nvm/versions/node/v22.9.0/lib/node_modules/@entropyxyz/cli
npm error command failed
npm error command sh -c husky
npm error sh: 1: husky: not found
npm notice
npm notice New minor version of npm available! 10.8.3 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g npm@10.9.0
npm notice
npm error A complete log of this run can be found in: /home/vagrant/.npm/_logs/2024-10-12T15_53_27_621Z-debug-0.log

@rh0delta you said you weren't seeing this error. I'm guessing you've got some required packages installed in your machine that aren't listed in the docs.

@rh0delta rh0delta self-assigned this Oct 18, 2024
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

2 participants