I have imported a module into my project. When running it separately it works fine. As soon as I want to use it in the browser it causes problems.
Uncaught TypeError: Failed to resolve module specifier "theblockchainapi". Relative references must start with either "/", "./", or "../".
This is how my import looks:
<script type="module" src="./app.js"></script>
the app.js starts with:
import theblockchainapi from 'theblockchainapi';
Change from:
import theblockchainapi from 'theblockchainapi';
to:
const theblockchainapi = require('theblockchainapi');