So everything worked fine in truffle 4.1.14, but when I upgraded to 5.0.0 I got this error:
TypeError: source.setEngine is not a function at Web3ProviderEngine.addProvider (node_modules/web3-provider-engine/index.js:71:10
I'm using this require:
const ProviderEngine = require('web3-provider-engine')
And this is the code that is cusing the error:
var engine = new ProviderEngine() engine.addProvider(web3.currentProvider)
Is it a bug with web3 provider engine? Any help would be great thanks!