I am trying to import detectEthereumProvider from '@metamask/detect-provider'.
When inspecting my website with live server open, I get a line saying
Uncaught TypeError: Failed to resolve module specifier "@metamask/detect-provider". Relative references must start with either "/", "./", or "../".
I have installed using npm install @metamask/detect-provider.
My package.json shows "@metamask/detect-provider": "^1.2.0",
It shows up in my node_modules.
In my index.html file, I include this:
<script src="https://unpkg.com/@metamask/detect-provider/dist/detect-provider.min.js"></script>
I am not sure what I have done wrong. If there is any other code I need to show please let me know what to show.