Closed alexreyes closed 1 year ago
Can you run node --version
@roninjin10 Ah shoot, I just realized I was previously using node v16.19.1
. I just ran nvm use
and switched to v16.16.0
.
It seems(?) to work now. I get a long error warning for node-hid
. Digging a bit deeper, it seems to be an optional dependency for ethers. Is this a problem, or expected?
➜ optimism git:(develop) yarn install
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > @babel/eslint-parser@7.18.2" has unmet peer dependency "@babel/core@>=7.11.0".
warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
warning " > eslint-plugin-jsdoc@35.5.1" has incorrect peer dependency "eslint@^6.0.0 || ^7.0.0".
warning " > eslint-plugin-promise@5.2.0" has incorrect peer dependency "eslint@^7.0.0".
warning " > eslint-plugin-react@7.24.0" has incorrect peer dependency "eslint@^3 || ^4 || ^5 || ^6 || ^7".
warning " > @eth-optimism/contracts@0.5.40" has unmet peer dependency "ethers@^5".
warning " > @eth-optimism/sdk@1.10.4" has unmet peer dependency "ethers@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @defi-wonderland/smock@2.0.2" has unmet peer dependency "@ethersproject/abi@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @defi-wonderland/smock@2.0.2" has unmet peer dependency "@nomiclabs/ethereumjs-vm@^4".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/abi@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/bytes@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > @typechain/ethers-v5@10.1.0" has unmet peer dependency "@ethersproject/providers@^5.0.0".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has unmet peer dependency "@ethersproject/abi@^5.4.7".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has unmet peer dependency "@ethersproject/providers@^5.4.7".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-periphery > @typechain/hardhat@6.1.2" has incorrect peer dependency "hardhat@^2.9.9".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/fault-detector > @defi-wonderland/smock@2.0.7" has unmet peer dependency "@ethersproject/abi@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/fault-detector > @defi-wonderland/smock@2.0.7" has unmet peer dependency "@ethersproject/abstract-signer@^5".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/sdk > typedoc@0.22.13" has incorrect peer dependency "typescript@4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x".
warning "workspace-aggregator-7374ec12-1e66-47e1-9bed-c952727d3e35 > @eth-optimism/contracts-bedrock > hardhat-deploy > zksync-web3@0.4.0" has incorrect peer dependency "ethers@~5.5.0".
[4/4] 🔨 Building fresh packages...
[-/21] ⢀ waiting...
[-/21] ⢀ waiting...
[11/21] ⢀ node-hid
[13/21] ⢀ keccak
warning Error running install script for optional dependency: "/Users/hack/Local/optimism/node_modules/node-hid: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /Users/hack/Local/optimism/node_modules/node-hid
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.16.0 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.16.0 | darwin | x64
gyp info find Python using Python version 3.9.6 found at \"/Library/Developer/CommandLineTools/usr/bin/python3\"
(node:58118) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/hack/Local/optimism/node_modules/node-hid/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/hack/Library/Caches/node-gyp/16.16.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/hack/Library/Caches/node-gyp/16.16.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/hack/Library/Caches/node-gyp/16.16.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/hack/Local/optimism/node_modules/node-hid',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CC(target) Release/obj.target/hidapi/hidapi/mac/hid.o
LIBTOOL-STATIC Release/hidapi.a
env: python: No such file or directory
make: *** [Release/hidapi.a] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/hack/Local/optimism/node_modules/@npmcli/run-script/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.3.0
gyp ERR! command \"/Users/hack/.nvm/versions/node/v16.16.0/bin/node\" \"/Users/hack/Local/optimism/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /Users/hack/Local/optimism/node_modules/node-hid
$ patch-package
patch-package 6.4.7
Applying patches...
No patch files found
$ husky install
husky - Git hooks installed
✨ Done in 19.20s.
Yup I got an M1 too and this node hid issue tends to happen on many repos. I've gotten it to go away before via doing something with python3 but I forgot exactly what I did. The error is completely benign though.
Closing this for now let us know if you have any further issues
I've gotten it to go away before via doing something with python3 but I forgot exactly what I did
have faced this before myself on an M2, but can't remember how I fixed it either
Describe the bug After cloning the repo, I tried running
yarn install
and it fails everytime.To Reproduce
On an M1 mac:
1) Clone the monorepo 2) run
yarn install
inside the monorepoExpected behavior The install succeeds
Screenshots If applicable, add screenshots to help explain your problem.
Full error message:
System Specs:
0f1692afe0b9cf7afc681615a7ce6817bfd94c7e
Additional context
Things I've tried: