truffle test fails when run from truffle develop
truffle unbox metacointruffle developtestI expect the tests to run
TypeError [ERR_INVALID_REPL_INPUT]: Listeners for `uncaughtException` cannot be used in the REPL
at process.<anonymous> (repl.js:224:15)
at process.emit (events.js:215:7)
at process.emit (/Users/tyler/.nvm/versions/node/v12.11.0/lib/node_modules/truffle/build/webpack:/~/source-map-support/source-map-support.js:465:1)
at _addListener (events.js:236:14)
at process.addListener (events.js:284:10)
at Runner.run (/Users/tyler/.nvm/versions/node/v12.11.0/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:868:11)
at Mocha.run (/Users/tyler/.nvm/versions/node/v12.11.0/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:612:17)
at /Users/tyler/.nvm/versions/node/v12.11.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:116:1
at new Promise (<anonymous>)
at Object.run (/Users/tyler/.nvm/versions/node/v12.11.0/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:115:1)
truffle version): 5.0.40node --version): 12npm --version): 6This bug is specific to Node 12 and is present in 5.0.39 and 5.0.38.
Looks like it was referenced by David Burela here https://github.com/trufflesuite/truffle/issues/2070
hello there, im having the same issue with Truffle v5.1.28, same behavior, just clarify the bug is present not only in 5.0.38 and 5.0.39.
Just made a fresh instalation following those steps, all works fine but the test command :) https://www.trufflesuite.com/boxes/drizzle
bests :)
carlos@carlos-linux-machine:~/desarrollo/sc1-ethereum-rinkeby/app$ truffle version
Truffle v5.1.28 (core: 5.1.28)
Solidity v0.5.16 (solc-js)
Node v12.18.0
Web3.js v1.2.1
`truffle(develop)> test
Using network 'develop'.
Compiling ./test/TestSimpleStorage.sol
Artifacts written to /tmp/test-202059-9170-1ypjpj2.6mm6
Compiled successfully using:
- solc: 0.5.16+commit.9c3226ce.Emscripten.clang
TypeError [ERR_INVALID_REPL_INPUT]: Listeners for uncaughtException cannot be used in the REPL
at process.
at process.emit (events.js:327:22)
at process.emit (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/source-map-support/source-map-support.js:495:1)
at processEmit (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/signal-exit/index.js:155:1)
at process.emit (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/reselect-tree/node_modules/source-map-support/source-map-support.js:485:1)
at _addListener (events.js:358:14)
at process.addListener (events.js:406:10)
at Runner.run (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:868:11)
at Mocha.run (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:612:17)
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:159:1
at new Promise (
at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/test.js:158:1)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
truffle(develop)>`
I just tested this in Truffle v5.1.31 and truffle test does work in this newest version. @eggplantzzz or @spore-engineering can you confirm? Thanks!
@fainashalts did you make sure to test using Node 12?
Running the test command within truffle develop using Node versions >= 12.3.0 should fail and throw the reported error.
@CruzMolina I thought I had changed my node version but turns out it was still running v10. You are right, this error does happen on >= 12.3.0! Sorry for the confusion!
Directly related to https://github.com/mochajs/mocha/issues/4009.
Would love more beta testers of our experimental release! https://github.com/trufflesuite/truffle/issues/2070#issuecomment-573198692:
Hey everyone! ✋
We just published an experimental prerelease that uses a fork of mocha with one tiny change. 🤞
Our node 12 CI appears to be pleased and smoke testing locally w/ node 12 LTS seems to be fine.
Please give it a try and let us know if things work!
npm un -g truffle npm i -g truffle@nodeLTS
Linking this PR because it may fix this issue. https://github.com/trufflesuite/truffle/pull/3146
Unfortunately, #3146 does not resolve this issue ☹️ https://github.com/trufflesuite/truffle/pull/3146#pullrequestreview-444917559
Hi Guys,
am running these versions and am getting the above error.
Truffle v5.1.35 (core: 5.1.35)
Solidity v0.5.16 (solc-js)
Node v12.18.2
Web3.js v1.2.1
Any recommendations?

See!!
@Yeleboh we have been working on a fix for this and I'm hoping it will be in this week's release! I'll post here with an update once that is the case. Thanks!
@fainashalts Thank you Faina for your reply. I look forward to this fix. However, if I reverted to earlier version of truffle, could this be a temporary fix until this week's release is out?
@Yeleboh If you downgrade Node to version 10 it should work.
@fainashalts Please please tell us when this is s updated. I'm having the same issue.
OK, this should be fixed now!