# Can't create new plugin

**URL:** <https://discourse.joplinapp.org/t/cant-create-new-plugin/14224>\
**Category:** Plugins\
**Created:** [23 January 2021 21:27 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224 "2021-01-23T21:27:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [23 January 2021 21:27 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/1 "2021-01-23T21:27:09Z")

</div>

I am trying to initialize a new plugin with `yo joplin` and getting this error

```auto
C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:154
                        if (typeof outputOptions.context === "undefined") outputOptions.context = firstOptions.context;
                                                                                                               ^
TypeError: Cannot read property 'context' of undefined
    at processOptions (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:154:91)
    at C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:364:3
    at Object.parse (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\node_modules\yargs\yargs.js:576:18)
    at C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:49:8
    at Object.<anonymous> (C:\dev\joplin-plugin-search-results\node_modules\webpack-cli\bin\cli.js:366:3)

```

Earlier today it worked fine, not sure what could have happened. Any pointers?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [23 January 2021 23:20 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/2 "2021-01-23T23:20:13Z")

</div>

An earlier version had this bug, but the latest one should be fine. What does `npm -g list generator-joplin` say?

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [23 January 2021 23:24 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/3 "2021-01-23T23:24:37Z")

</div>

```auto
C:\dev> npm -g list generator-joplin
C:\Users\MRR\AppData\Roaming\npm
`-- generator-joplin@1.7.1

```

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [23 January 2021 23:27 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/4 "2021-01-23T23:27:08Z")

</div>

Updated to `1.7.3` but still getting the same error.

UPD  
Wiped the directory and re-ran `yo joplin` again, and it's now fine.

---

<div class="post-metadata">

**Author:** ![ferent](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/ferent/32/186_2.png) [@ferent](https://discourse.joplinapp.org/u/ferent)\
**Post date:** [26 January 2021 15:14 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/5 "2021-01-26T15:14:09Z")

</div>

Same issue here, what directory did you wipe? I'm on MacOs

---

<div class="post-metadata">

**Author:** ![roman\_r\_m](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/roman_r_m/32/3297_2.png) [@roman\_r\_m](https://discourse.joplinapp.org/u/roman_r_m)\
**Post date:** [26 January 2021 15:43 UTC](https://discourse.joplinapp.org/t/cant-create-new-plugin/14224/6 "2021-01-26T15:43:50Z")

</div>

The one where I executed `yo joplin` from. I didn't have any code of my own so it was safe to do.
