I've been following Dapp University's videos on how to make IPFS uploads with Euthereum Smart contracts, and after I manage to 'npm run start' in the command line it opens up the HTML, but it always gives me this error: 'No web3 instance injected, using local web3.'
Here is the link to the first video: https://www.youtube.com/watch?v=SkMH0WeRYtg&t=1s
And here is the link to his code: https://github.com/dappuniversity/ipfs_image_uploader
I have a suspicion that the issue might lie within the getWeb3.js file, but maybe you had the same issue and know how to complete the tutorial, in any case, I would really appreciate your help!
This is the code of the getWeb3.js file :
import Web3 from 'web3'
let getWeb3 = new Promise(function(resolve, reject) { // Wait for loading completion to avoid race conditions with web3 injection timing. window.addEventListener('load', function() { var results var web3 = window.web3
// Checking if Web3 has been injected by the browser (Mist/MetaMask)
if (typeof window.web3 !== 'undefined') {
// Use Mist/MetaMask's provider.
web3 = new Web3(window.web3.currentProvider)
results = {
web3: web3
}
console.log('Injected web3 detected.');
resolve(results)
} else {
// Fallback to localhost if no web3 injection. We've configured this to
// use the development console's port by default.
var provider = new Web3.providers.HttpProvider('http://127.0.0.1:9545')
web3 = new Web3(provider)
results = {
web3: web3
}
console.log('No web3 instance injected, using Local web3.');
resolve(results)
}