Welcome to the forum discussion for this section. Here you can ask questions or post feedback.
I’m experiencing a problem as I try to run the first unit test - file compilation is fine though. I get the following error:
Any recommendations are welcome! Thanks!
Problem solved. Had to delete some lines of code in runner.js file - one of the files in truffle documentation.
Read this blog post for more info: https://github.com/mochajs/mocha/issues/4009
Awesome! I’m glad you solved it Let me know if you have more issues.
Hi. Can you please be more specific on how to solve this issue? I tried the link you attached, but I can`t find the solution.
You have to find runner.js file (mocha library file) and delete 3 lines of code. The code is either at the given lines, or further on at line 900 smth.
Hope that helps!
I had the same error. “TypeError [ERR_INVALID_REPL_INPUT]: Listeners for
If the changes in the runner.js file does not help you to run mocha test, like in my case. You can also consider to downgrade Node if you already have the new Node version 12.
It looks like that there is still a problem with the current Node version 12.14 and the mocha/truffle setup. It helped me to uninstall the current Node version and reinstall Node version 10.18. https://nodejs.org/download/release/v10.18.0/
This works fine for me.
Hope you can get it to run in one or the other way.
Hi @Paultier Thank you very much!
I just fixed the problem by downloading the msi file in the link you provided!
I can confirm node v12.14.1 still produces the above error and as Paultier pointed out v10.18.0 works dandy. These kind of node version related errors are common. I finally broke down and installed Node Version Manager (NVM). This allows you to install multiple versions of node and switch between them with a command line call:
EDIT: note you’ll need to reinstall truffle after using NVM as the global utilities are linked to specific versions of node after doing this.