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 681 forks source link

@truffle/preserve-to-ipfs error with Node 16 #3448

Open cds-amal opened 3 years ago

cds-amal commented 3 years ago

While trying to test Node 16 @lsqproduction and I discovered that @truffle/preserve-to-ipfs failed with the following error.

Steps to reproduce

yarn run v1.22.17
$ ./scripts/test.sh
$ /home/amal/work/truffle/node_modules/.bin/semver -r '>=12' v16.13.0
16.13.0
ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be removed in ts-jest 27, use `tsconfig` instead
FAIL test/ipfs.test.ts
  ● Test suite failed to run

    This version of µWS is not compatible with your Node.js build:

    Error: Cannot find module './uws_linux_x64_93.node'

      at ../../node_modules/ganache/dist/node/webpack:/Ganache/core/node_modules/@seesemichaelj/uwebsockets.js/src/uws.js:30:9
      at Object.call (../../node_modules/ganache/dist/node/webpack:/Ganache/core/node_modules/@seesemichaelj/uwebsockets.js/src/uws.js:18:18)
      at __webpack_require__ (../../node_modules/ganache/dist/node/webpack:/Ganache/webpack/bootstrap:18:32)
      at Object.call (../../node_modules/ganache/dist/node/webpack:/Ganache/core/lib/src/server.js:22:42)
      at __webpack_require__ (../../node_modules/ganache/dist/node/webpack:/Ganache/webpack/bootstrap:18:32)
      at Object.call (../../node_modules/ganache/dist/node/webpack:/Ganache/core/lib/index.js:8:34)
      at __webpack_require__ (../../node_modules/ganache/dist/node/webpack:/Ganache/webpack/bootstrap:18:32)
      at Object.call (../../node_modules/ganache/dist/node/webpack:/Ganache/cli/lib/index.js:7:32)
      at __webpack_require__ (../../node_modules/ganache/dist/node/webpack:/Ganache/webpack/bootstrap:18:32)
      at Object.31416 (../../node_modules/ganache/dist/node/webpack:/Ganache/index.ts:1:1)

  console.warn
    bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)

      at Object.call (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavoredpackages/utils/node_modules/bigint-buffer/dist/node.js:10:17)
      at __webpack_require__ (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavored Ganache/webpack/bootstrap:18:32)
      at Object.call (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavoredsrc/utils/bigint-to-buffer.ts:19:26)
      at __webpack_require__ (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavored Ganache/webpack/bootstrap:18:32)
      at Object.call (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavoredsrc/utils/index.ts:1:1)
      at __webpack_require__ (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavored Ganache/webpack/bootstrap:18:32)
      at Object.2718 (../../node_modules/@ganache/filecoin/dist/node/webpack:/Filecoin-flavoredindex.ts:2:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.055 s, estimated 5 s
Ran all test suites.

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  TickObject

      at new Decoder (../../node_modules/borc/src/decoder.js:58:19)
      at Object.<anonymous>.exports.configureDecoder (../../node_modules/ipld-dag-cbor/src/util.js:122:13)
      at Object.<anonymous> (../../node_modules/ipld-dag-cbor/src/util.js:127:9)

(node:38768) V8: /home/amal/work/truffle/node_modules/borc/src/decoder.asm.js:3 Linking failure in asm.js: Unexpected stdlib member
(Use `node --trace-warnings ...` to show where the warning was created)
(node:38768) V8: /home/amal/work/truffle/node_modules/ganache/dist/node/ganache.min.js:2 Linking failure in asm.js: Unexpected stdlib member
Done in 3.91s.
MicaiahReid commented 1 year ago

I believe this should be fixed, @cds-amal are you able to confirm?

cds-amal commented 1 year ago

I believe this should be fixed, @cds-amal are you able to confirm?

@MicaiahReid that project relies on @ganache/filecoin, and a tagged ganache version. How should I update to test?

"@ganache/filecoin": "0.1.2", "ganache": "3.0.0-filecoin.3",

davidmurdoch commented 1 year ago

I'd try updating to "ganache": "7.6.0" and "@ganache/filecoin": "0.7.0"