# Problem using wavesurfer.js from npm plugin

**URL:** <https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286>\
**Category:** How do I?\
**Created:** [February 5, 2025, 4:16pm UTC](https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286 "2025-02-05T16:16:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas\_papernest](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomas_papernest/32/12405_2.png) [@thomas\_papernest](https://community.weweb.io/u/thomas_papernest)\
**Post date:** [February 5, 2025, 4:16pm UTC](https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286/1 "2025-02-05T16:16:41Z")

</div>

Hello everyone,

I am trying to use the wavesurfer package. I installed it following @dorilama tutorial here ([Add visual elements using NPM - #5 by dorilama](https://community.weweb.io/t/add-visual-elements-using-npm/4785/5)).  
I am running this js code inside a workflow :

```auto
return pluginVariables[
  /* wavesurfer.js */ "69d4a5bb-09a3-4f3d-a94e-667c21c057eb"
]["wavesurfer.js"].create({
  container: wwLib.getFrontDocument().querySelector("#waveform"),
  waveColor: "#4F4A85",
  progressColor: "#383351",
  url: "https://dl.dropbox.com/s/c4i9dvr6g7bjvhr/miku_doremi120.mp3?dl=0",
});

```

And I am getting the following error : message: “Cannot read properties of undefined (reading ‘create’)”

Any idea on where this issue is coming from ?

 ![wavesurfer](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/dec24cd9397570ab0965f3897b96dd01168f8f74.png)

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [February 5, 2025, 6:12pm UTC](https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286/2 "2025-02-05T18:12:22Z")

</div>

did you set up the plugin like the instructions in the tutorial, including the instance name?

---

<div class="post-metadata">

**Author:** ![thomas\_papernest](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomas_papernest/32/12405_2.png) [@thomas\_papernest](https://community.weweb.io/u/thomas_papernest)\
**Post date:** [February 5, 2025, 6:20pm UTC](https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286/3 "2025-02-05T18:20:45Z")

</div>

Yes I did !

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bef9fe52e10f79ebbb0c02b75bed780482f169e2.png)

---

<div class="post-metadata">

**Author:** ![thomas\_papernest](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomas_papernest/32/12405_2.png) [@thomas\_papernest](https://community.weweb.io/u/thomas_papernest)\
**Post date:** [February 5, 2025, 6:22pm UTC](https://community.weweb.io/t/problem-using-wavesurfer-js-from-npm-plugin/16286/4 "2025-02-05T18:22:58Z")

</div>

Okey, my page was in daft mode, that was the issue !
