trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.62k stars 683 forks source link

Installation failure on darwin/arm64: "node-pre-gyp: command not found" #4192

Closed gcobr closed 1 year ago

gcobr commented 1 year ago

Installation in the following environment fails with the error node-pre-gyp: command not found:

➜  tmp arch
arm64
➜  tmp sw_vers                 
ProductName:        macOS
ProductVersion:     13.1
BuildVersion:       22C65
➜  tmp node --version          
v16.19.0
➜  tmp npm --version           
8.19.3

Sample package.json:

➜  tmp cat package.json 
{
  "name": "tmp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@ganache/cli": "^0.8.2"
  }
}

See the details:

➜  tmp npm install
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated uri-to-multiaddr@4.0.0: This module is deprecated, please upgrade to @multiformats/uri-to-multiaddr
npm WARN deprecated electron-download@3.3.0: Please use @electron/get moving forward.
npm WARN deprecated multiaddr-to-uri@6.0.0: This module is deprecated, please upgrade to @multiformats/multiaddr-to-uri
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated eth-sig-util@2.5.3: Deprecated in favor of '@metamask/eth-sig-util'
npm WARN deprecated ipld-raw@6.0.0: This module has been superseded by the multiformats module
npm WARN deprecated cids@1.1.9: This module has been superseded by the multiformats module
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated multiaddr@8.1.2: This module is deprecated, please upgrade to @multiformats/multiaddr
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated multibase@3.1.2: This module has been superseded by the multiformats module
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated ipld-dag-pb@0.20.0: This module has been superseded by @ipld/dag-pb and multiformats
npm WARN deprecated multiaddr@9.0.2: This module is deprecated, please upgrade to @multiformats/multiaddr
npm WARN deprecated multiaddr@9.0.2: This module is deprecated, please upgrade to @multiformats/multiaddr
npm WARN deprecated multicodec@3.2.1: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated multicodec@2.1.3: This module has been superseded by the multiformats module
npm WARN deprecated ipfs-block-service@0.18.0: This module has been merged into ipfs
npm WARN deprecated ipld-dag-cbor@0.17.0: This module has been superseded by @ipld/dag-cbor and multiformats
npm WARN deprecated libp2p-noise@2.0.5: This repository is now being maintained by ChainSafe, and can be found at https://github.com/ChainSafe/js-libp2p-noise under @chainsafe/libp2p-noise
npm WARN deprecated ipld@0.28.0: Please use the multiformats module instead
npm ERR! code 1
npm ERR! path /Users/gabriel/tmp/node_modules/wrtc
npm ERR! command failed
npm ERR! command sh -c -- node scripts/download-prebuilt.js
npm ERR! /bin/sh: node-pre-gyp: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gabriel/.npm/_logs/2023-01-28T01_19_35_923Z-debug-0.log
davidmurdoch commented 1 year ago

Does npm install ganache work?

gcobr commented 1 year ago

Does npm install ganache work?

It does.

davidmurdoch commented 1 year ago

You should use that, it uses that CLI package internally. The @ganache/cli package's public interface is not considered stable, and it really shouldn't be used directly.