title: "@metamask/detect-provider: Unable to detect window.ethereum" error even though Metamask is installed and running
body: <p>I am trying to run a basic program that detects if the user has window.ethereum installed. When I run my program I get &quot;@metamask/detect-provider: Unable to detect window.ethereum&quot;, even though I have Metamask installed and running in my browser. Has anyone had similar problems? Thanks in advance.</p>
  <p>Javascript:</p>
  <pre><code>import detectEthereumProvider from '@metamask/detect-provider';
   
  const provider = await detectEthereumProvider();
   
  if (provider) {
   
    console.log('Ethereum successfully detected!');
   
    })
  } else {
   
    console.error('Please install MetaMask!', error);
  }
  </code></pre>