# Generator-joplin / Webpack: permission denied

**URL:** <https://discourse.joplinapp.org/t/generator-joplin-webpack-permission-denied/18262>\
**Category:** Plugins\
**Created:** [26 June 2021 21:29 UTC](https://discourse.joplinapp.org/t/generator-joplin-webpack-permission-denied/18262 "2021-06-26T21:29:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![itc-ger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/itc-ger/32/7063_2.png) [@itc-ger](https://discourse.joplinapp.org/u/itc-ger)\
**Post date:** [26 June 2021 21:29 UTC](https://discourse.joplinapp.org/t/generator-joplin-webpack-permission-denied/18262/1 "2021-06-26T21:29:29Z")

</div>

I want to develop a Joplin plugin and was following these intructions to set up a dev environment on Ubuntu:  
[https://joplinapp.org/api/get\_started/plugins/](https://joplinapp.org/api/get_started/plugins/)

But unforunately I got stuck with `yo joplin` which fails on `npm install` executing `webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive`  
I tried to debug this. But all I currently know is, that the `webpack --joplin-plugin-config buildMain` seems to fail creating the necessary directories.  
Maybe `CopyPlugin` fails - but this is just a guess.

From my point of view the Linux directory permissions are fine. Ownership of all files/dirs are good and I didn't found any suspicious permissions in ne working directory.

Any ideas?

---

<div class="post-metadata">

**Author:** ![itc-ger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/itc-ger/32/7063_2.png) [@itc-ger](https://discourse.joplinapp.org/u/itc-ger)\
**Post date:** [27 June 2021 08:19 UTC](https://discourse.joplinapp.org/t/generator-joplin-webpack-permission-denied/18262/2 "2021-06-27T08:19:43Z")

</div>

output of `npm install`

```auto
> joplin-plugin-testPlugin@1.0.0 prepare
> npm run dist

> joplin-plugin-testPlugin@1.0.0 dist
> webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive

sh: 1: webpack: Permission denied
npm ERR! code 126
npm ERR! path /home/itc-ger/Development/Joplin/testPlugin
npm ERR! command failed
npm ERR! command sh -c npm run dist

npm ERR! A complete log of this run can be found in:
npm ERR! /home/itc-ger/.npm/_logs/2021-06-27T07_41_51_063Z-debug.log

```

and that's what the logfile says

```auto
43 verbose reify failed optional dependency /home/itc-ger/Development/Joplin/testPlugin/node_modules/fsevents
44 silly reify mark deleted [
44 silly reify '/home/itc-ger/Development/Joplin/testPlugin/node_modules/fsevents'
44 silly reify ]
45 verbose reify failed optional dependency /home/itc-ger/Development/Joplin/testPlugin/node_modules/watchpack-chokidar2/node_modules/fsevents
46 silly reify mark deleted [
46 silly reify '/home/itc-ger/Development/Joplin/testPlugin/node_modules/watchpack-chokidar2/node_modules/fsevents'
46 silly reify ]
47 verbose reify failed optional dependency /home/itc-ger/Development/Joplin/testPlugin/node_modules/bindings
48 silly reify mark deleted [
48 silly reify '/home/itc-ger/Development/Joplin/testPlugin/node_modules/bindings'
48 silly reify ]
49 verbose reify failed optional dependency /home/itc-ger/Development/Joplin/testPlugin/node_modules/nan
50 silly reify mark deleted [
50 silly reify '/home/itc-ger/Development/Joplin/testPlugin/node_modules/nan'
50 silly reify ]
51 verbose reify failed optional dependency /home/itc-ger/Development/Joplin/testPlugin/node_modules/file-uri-to-path
52 silly reify mark deleted [
52 silly reify '/home/itc-ger/Development/Joplin/testPlugin/node_modules/file-uri-to-path'
52 silly reify ]

113 verbose stack Error: command failed
113 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
113 verbose stack at ChildProcess.emit (events.js:314:20)
113 verbose stack at maybeClose (internal/child_process.js:1022:16)
113 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
114 verbose pkgid joplin-plugin-insert-collapsed-pdf@1.0.0
115 verbose cwd /home/itc-ger/Development/Joplin/testPlugin
116 verbose Linux 5.11.0-18-generic
117 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install"
118 verbose node v12.21.0
119 verbose npm v7.19.0
120 error code 126
121 error path /home/itc-ger/Development/Joplin/testPlugin
122 error command failed
123 error command sh -c npm run dist
124 verbose exit 126

```

If I try to install `fsevents` I'm receiving this error:

```auto
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: undefined
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64

```

---

<div class="post-metadata">

**Author:** ![itc-ger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/itc-ger/32/7063_2.png) [@itc-ger](https://discourse.joplinapp.org/u/itc-ger)\
**Post date:** [27 June 2021 08:47 UTC](https://discourse.joplinapp.org/t/generator-joplin-webpack-permission-denied/18262/3 "2021-06-27T08:47:46Z")

</div>

It turns out, that running the install script from a Linux partition that is mounted with the ´noexec´ mount-option was causing this error 🙀 🙈
