Prompt to run truffle init
See original GitHub issueIf I run solidity-coverage
in a directory where truffle hasn’t been initialised, I get:
Generating coverage environment
ls: no such file or directory: ./coverageEnv/contracts/**/*.sol
Launched testrpc on port 8555
Running: truffle test
(this can take a few seconds)...
/usr/lib/node_modules/truffle/build/cli.bundled.js:213349
files = files.filter(function(file) {
^
TypeError: Cannot read property 'filter' of undefined
at /usr/lib/node_modules/truffle/build/cli.bundled.js:213349:20
at /usr/lib/node_modules/truffle/build/cli.bundled.js:214669:25
at FSReqWrap.oncomplete (fs.js:153:21)
Cleaning up...
There was an error generating coverage. Possible reasons include:
1. Another application is using port 8555
2. Truffle crashed because your tests errored
Error: ENOENT: no such file or directory, open './allFiredEvents'
Exiting without generating coverage...
I’m a noob, but it took me a while to work out what was going on.
Perhaps check if files is undefined and say something like:
"Can’t find truffle files. Have you run “truffle init”?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Command line options - Truffle Suite
Run a console with contract abstractions and commands available. ... to be available through `truffle init` should use `truffle unbox MetaCoin` instead.
Read more >Creating your First Truffle Project (part 1 of 2) - Ippon
This is an introduction on how to get started with a Truffle-based Solidity project. This article series will not only explain how to...
Read more >Learn Truffle and Ganache – How to Create and Deploy a ...
To start a project in Truffle, go into a directory and type the init command. truffle init. Screenshot-2022-07-16-193451. This will create a new ......
Read more >Truffle commands - DApp develop framework | PlatON
--interactive : Prompt to confirm that the user wants to proceed after the dry run. networks¶. Show addresses for deployed contracts on each...
Read more >Command reference - Truffle Suite
Once the console starts, you can then use your contracts via the command line like you would in your code. Additionally, all truffle...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Welcome 😃 The link I gave says it would be better to use:
Your test runner (Truffle?) crashed because the tests encountered an error.
Perhaps s/crashed/failed/
Will do. Thanks!