truffle test stuck for node v14; works with v12

Created on 24 Jun 2020  路  9Comments  路  Source: trufflesuite/truffle

Issue

truffle test is just stuck and doesn't do anything for node v14.

Steps to Reproduce

Install node v14

truffle unbox metacoin
truffle build
truffle test

Expected Behavior

Tests run.

Actual Results

Command is stuck and doesn't return, no output is printed.

Environment

  • Operating System: Arch Linux
  • Ethereum client: geth 1.9.15-stable-0f77f34b (irrelevant here, as tests use temporary ganache)
  • Truffle version (truffle version): 5.1.31
  • node version (node --version): 14.4.0
  • npm version (npm --version): 6.14.5
error better help wanted priority3 馃敡

Most helpful comment

It may be nice to check for the node version when truffle test is run and print a warning that ganache-cli doesn't support v14 yet and that it is recommended to revert node to v12 or manually start ganache-cli in a separate terminal. This would probably save many hours for many people running truffle test until this is fixed.

All 9 comments

Hey @sebastianst !

This is an issue related to ganache-core's internals not yet being Node 14 compatible (trufflesuite/ganache-cli#732).

It's a bit of an inconvenience but I've had some luck being able to still run ganache-cli in a separate terminal and running truffle tests against them on node 14.4.0. YMMV. For now, we're recommending users drop back down to Node 12.

I see, thanks for the heads-up. At first it was hard to determine where this problem comes from. Node? ganache? truffle? my tests? So I hope this issue will help others who run into the same problem.

For now, I just reverted to node v12 as I don't need any particular v14 features. It was just the default on my system (Arch Linux).

It may be nice to check for the node version when truffle test is run and print a warning that ganache-cli doesn't support v14 yet and that it is recommended to revert node to v12 or manually start ganache-cli in a separate terminal. This would probably save many hours for many people running truffle test until this is fixed.

@sebastianst I think that's a good idea! We'll put this in our backlog, though you are welcome to give it a try yourself and make a PR!

OK, this should now be fixed with this week's release! Please let us know if it's not.

Still experiencing the exact same problem with
Truffle v5.1.31 (core: 5.1.31)
Solidity v0.5.16 (solc-js)
Node v14.4.0
Web3.js v1.2.1

@YannyD, could you try upgrading to the latest version of Truffle and see if that resolves the problem?

Cool. Works with
Truffle v5.1.57 (core: 5.1.57)
Solidity v0.5.16 (solc-js)
Node v14.15.1
Web3.js v1.2.9

OK, great! I'll re-close this then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LogvinovLeon picture LogvinovLeon  路  30Comments

dcnl1980 picture dcnl1980  路  63Comments

dwalintukan picture dwalintukan  路  80Comments

KadenZipfel picture KadenZipfel  路  31Comments

m888m picture m888m  路  44Comments