Just try to click website function or action. Like compile, then try again console

web3.eth.accounts

maybe no error

Or

var web3 = new Web3(new Web3.providers.HttpProvider(“http://myLocalHostIP:myRpcPort”));