Al intentar conectarme a un proveedor (infura), aparece el error anterior a continuación: el seguimiento completo de la pila:
bundle.js:54318 Uncaught TypeError: this.provider.sendAsync is not a function
at Web3Subprovider.handleRequest (bundle.js:54318)
at next (bundle.js:53398)
at Web3ProviderEngine._handleAsync (bundle.js:53385)
at Web3ProviderEngine._fetchBlock (bundle.js:53494)
at Web3ProviderEngine._fetchLatestBlock (bundle.js:53470)
at Web3ProviderEngine._startPolling (bundle.js:53447)
at Web3ProviderEngine.start (bundle.js:53341)
at window.onload (bundle.js:61042)
Web3Subprovider.handleRequest @ bundle.js:54318
next @ bundle.js:53398
Web3ProviderEngine._handleAsync @ bundle.js:53385
Web3ProviderEngine._fetchBlock @ bundle.js:53494
Web3ProviderEngine._fetchLatestBlock @ bundle.js:53470
Web3ProviderEngine._startPolling @ bundle.js:53447
Web3ProviderEngine.start @ bundle.js:53341
window.onload @ bundle.js:61042
Aquí hay un truco para proporcionar compatibilidad con Truffle que usa web3 0.20.x
Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.send;