I'm currently having an issue with initializing LogRocket
. I followed the steps from the
official documentation:
- I successfully installed it using node:
npm i --save logrocket
- However, when trying to initialize it on my page earlier with:
<script type="module">
// init LogRocket
import LogRocket from 'logrocket'
LogRocket.init("my/project/id")
</script>
I encountered this error message:
Uncaught TypeError: Error resolving module specifier: logrocket
.
Even though I can access the logrocket module by using Cmd+click
on from 'logrocket'
.
On the other hand, I can use logrocket without the npm approach.
<script src="https://cdn.lr-ingest.io/LogRocket.min.js" crossorigin="anonymous"></script>
<script>window.LogRocket && window.LogRocket.init('my/project/id');</script>
Has anyone else experienced a similar issue? Any ideas on how to resolve it?