First, say hello to the developer community, I´m brand new in this world. I have a big issue with the network and I can´t work with my contract. First of all, these are the versions which I´m working in my environment:

  • node v9.2.0
  • Truffle v4.0.1
  • Solidity v0.4.18
  • npm v5.5.1
  • nvm 9.2.0

And I´m working with an Ubuntu Subsystem for Windows (currently using windows 10).

Steps I´ve done in order to reproduce the situation:

  1. Customize truffle.js configuration file, from the bottom this file was completely empty (in MetaCoin example too). I wrote this code inside, following the instructions in the docs:

    module.exports = {
        networks: {
          development: {
            host: "localhost",
            port: 8545,
            network_id: "*"
  2. The file truffle-config.js is empty!

  3. Go to my project folder and type:

    $ ganache-cli

So, the command show me the accounts available, the Ganache CLI version and "Listening on localhost: 8545"

  1. Open another terminal and going again to my project folder and type:

    $ truffle compile
    Compiling ./contracts/Migrations.sol...
    Compiling ./contracts/OVXET.sol...
    Compilation warnings encountered:
    /mnt/c/Users/jorge/Desktop/OVX/Solidity/Token/OVXET/contracts/OVXET.sol:117:5: Warning: Function state mutability can be restricted to view
        function IndexOf(address account) internal returns (uint pos) {
    Spanning multiple lines.
    Writing artifacts to ./build/contracts
  2. Then type:

    $ truffle migrate --reset
    With the reset flag...
    This is the RESULT:
    Using network 'development'.
    Running migration: 1_initial_migration.js
      Deploying Migrations...
      ... 0x8076b9890b06d8853797298bb074e1ba21b71987550fed280d18c977571182d3
      Migrations: 0xf2427532de5084c1652cceacafa590ab6aa31f2a
    Saving successful migration to network...
      ... 0xfae40f4916a9fcc0af6d206e220b0c8e142b7a878a45f8b84444f633b0562413
    Saving artifacts...
    Running migration: 2_deploy_contract.js
      Deploying OVXET...
      ... 0x6241bebe3c1e5c1dc2df1ee16876fd0fb509885dfeda69ee7587893180aa5623
      OVXET: 0xb8493d7165eb6dd17a96b9b3c400e7c1af790353
    Saving successful migration to network...
      ... 0x66fa9b7e33469ea6831f6c49f42a4867b852f1e0c6e153e18db4cda3336803bb
    Saving artifacts...
  3. Check truffle networks:

    $ truffle networks
    The following networks are configured to match any network id ('*'):

Closely inspect the deployed networks below, and use truffle networks --clean to remove any networks that don't match your configuration. You should not use the wildcard configuration ('*') for staging and production networks for which you intend to deploy your application.

Network: UNKNOWN (id: 1512677027871)
  Migrations: 0xf2427532de5084c1652cceacafa590ab6aa31f2a
  OVXET: 0xb8493d7165eb6dd17a96b9b3c400e7c1af790353

My question is...I don´t want the development client of truffle, I want to use ganache-cli client to test my code. In these days I had problems with the conection with ganache-cli because the system told me that the contractd wasn´t deployed in any network and looking in the ./build/contracts folder...the network was empty {}

  • I would leave truffle alone as it is in rapid development and breaks often. Just create your own custom node. You shouldn't have a lot of issues with ganache, the culprit has to be Truffle. Create a custom node and grab yourself ganache, Mocha and web3, run some tests on it with Mocha and you should be on your way. – Daniel Mar 5 at 16:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.