question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'truffle compile' doesn't work properly when using multiple network providers.

See original GitHub issue

Issue

Used truffle 4.1.8 and everything was ok. Updated to the latest (4.1.11). Now it seems it compiles the contracts but I must cancel/stop it manually. Here is my folder: http://dropmefiles.com/7dHdO In the same time tried to compile contracts in another folder - it compiles them successfully.

Steps to Reproduce

Unzip the folder from this link and run truffle compile.

Expected Behavior

Compiling process is finished successfully

Actual Results

It seems that contracts are compiled but I see Writing artifacts to ./build/contracts infinitely.

Environment

  • Operating System: OSX 10.13.4
  • Ethereum client: none (is not involved)
  • Truffle version (truffle version): 4.1.11
  • node version (node --version): v9.9.0
  • npm version (npm --version): 6.0.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cgeweckecommented, May 23, 2018

@Gargo

  1. Unfortunately the non-function format for the wallet is only reliable if there is a single provider. The docs could use some improvement in that section because it’s not obvious why there are two formats. The ‘function’ form was introduced because the non-function form causes super weird behavior in the provider when there are multiple connections open to Infura. Original bug report at #348.

  2. No great answer for this - truffle compile builds the artifacts and networks are one the things we track in that object. At the moment this isn’t very helpful but it will become important when the artifact is refactored for the next major release because it will be possible to specify different compilations for different networks. In the comment above I’m just trying to narrow things a bit so we can figure out what’s going wrong. I know the config is getting loaded - I want to see if there’s a specific issue with connecting remotely or not.

0reactions
cgeweckecommented, May 25, 2018

@gerchicov-bp Thanks for opening this - have amended the docs to remove the non-function closure examples.

Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Truffle compile and migrate not working
Then, both Truffle compile and Truffle migrate worked fine. Another important thing to ensure is that you use the correct port number in...
Read more >
Configuration - Truffle Suite
For each network, you can specify host / port , url , or provider , but not more than one. If you need...
Read more >
How to write, test and deploy Ethereum smart contracts using ...
This article will look at writing, testing and deploying a smart contract using the Solidity programming language and Truffle.
Read more >
Using Infura (or a custom provider) - Truffle Suite
Using Infura (or a custom provider). Infura is a hosted Ethereum node cluster that lets your users run your application without requiring them...
Read more >
5 minute guide to deploying smart contracts with Truffle and ...
1. Set up · 2. Create your contract · 3. Deploy your contract · 4. Configure Ropsten network and the provider · 5....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found