use remix ethereum online smart constract console Invalid JSON RPC response: undefined
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”));