我安装在 WSL 设置附近。
Linux NT00654071 4.4.0-19041-Microsoft #3996-Microsoft 1 月 18 日星期四 16:36:00 PST 2024 x86_64 x86_64 x86_64 GNU/Linux
node 和 npm 版本都可以。我在安装前更改了默认的 npm 目录。
npm install -g 近cli npm warn 已弃用 [email protected]:改用 3.0.0,安全缓冲区已合并并发布以实现兼容性 npm 警告已弃用 @ledgerhq/[电子邮件受保护]:@ledgerhq/hw-transport-u2f 已弃用。请使用@ledgerhq/hw-transport-webusb 或@ledgerhq/hw-transport-webhid。 https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md
1m内换了240个包裹
当我尝试接近 --help 时,我收到此错误。你能帮我吗?
* near --help*
**Failed to initialize libusb.**
/home/igor/.nvm/versions/node/v22.6.0/lib/node_modules/near-cli/node_modules/usb/dist/usb/index.js:30
Object.defineProperty(usb.Device.prototype, name, Object.getOwnPropertyDescriptor(device_1.ExtendedDevice.prototype, name) || Object.create(null));
^
TypeError: Cannot read properties of undefined (reading 'prototype')
at /home/igor/.nvm/versions/node/v22.6.0/lib/node_modules/near-cli/node_modules/usb/dist/usb/index.js:30:38
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/igor/.nvm/versions/node/v22.6.0/lib/node_modules/near-cli/node_modules/usb/dist/usb/index.js:29:63)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
Node.js v22.6.0
我尝试在附近安装,但出现 libusb 初始化错误。我预计很快就能正常工作。
当你说“靠近”时,你的意思是安装在 CLI 附近吗?
尝试安装预构建的二进制文件
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/download/v0.15.1/near-cli-rs-installer.sh |嘘