# Spawn bin/genieacs-ext ENOENT - 1.2-beta.0

**URL:** <https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205>\
**Category:** Uncategorized\
**Created:** [August 3, 2019, 2:07pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205 "2019-08-03T14:07:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbtech](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gbtech](https://forum.genieacs.com/u/gbtech)\
**Post date:** [August 3, 2019, 2:07pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/1 "2019-08-03T14:07:40Z")

</div>

I have installed the latest beta, and have copied a working extensions file (cpe-config.js) and as per the install instructions I have placed it in /opt/genieacs/ext/cpe-config.js and call it in my provisioning script with `const token=ext("cpe-config", "getToken", null)` but I get a fault / error in the logs of `spawn bin/genieacs-ext ENOENT`

This is a vanilla install of the new GenieACS beta, any idea why this is?

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [August 4, 2019, 12:02am UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/2 "2019-08-04T00:02:11Z")

</div>

Shouldn’t the path be /opt/genieacs/config/ext?

---

<div class="post-metadata">

**Author:** ![gbtech](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gbtech](https://forum.genieacs.com/u/gbtech)\
**Post date:** [August 5, 2019, 7:10pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/3 "2019-08-05T19:10:53Z")

</div>

I have created the Path /opt/genieacs/config/ext with the file cpe-config.js in there and I still get the same error.

Is there an value I need to put into the genieacs.env file to let CWMP know where the extensions are stored?  
 ![genie](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/172e663f8d6dccfbc744e02506a571b8668f40e1.png)

---

<div class="post-metadata">

**Author:** ![gbtech](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@gbtech](https://forum.genieacs.com/u/gbtech)\
**Post date:** [August 5, 2019, 9:42pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/4 "2019-08-05T21:42:51Z")

</div>

Think I have found the issue, in lib/extensions.ts, line 46:

`const p = spawn("bin/genieacs-ext", [scriptName], {`

having changed this to:

```
 const p = spawn(ROOT_DIR + "bin/genieacs-ext", [scriptName], {

```

seems to rectify my problem, when executing the ‘ext()’ function, it wasn’t finding genieacs-ext file in bin, and was nothing to do with my script, adding ROOT\_DIR to the line, allows it to find genieacs-ext and all is good in the world, not sure if you want to amend the code on GITHUB?

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [August 6, 2019, 3:47am UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/5 "2019-08-06T03:47:11Z")

</div>

Good catch! Feel free to submit a PR for this fix. Make sure to run ‘npm run lint’ before you commit. Thanks!

---

<div class="post-metadata">

**Author:** ![breakiboy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/breakiboy/32/605_2.png) [@breakiboy](https://forum.genieacs.com/u/breakiboy)\
**Post date:** [August 29, 2019, 12:36pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/6 "2019-08-29T12:36:18Z")

</div>

is there a possiblity to edit somewhere a file to get run ext scripts I have the same issue on CentOS7 but i dont really find --\>\>\> Think I have found the issue, in lib/extensions.ts, line 46:

can anyone help me :=D

---

<div class="post-metadata">

**Author:** ![TKasperczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/tkasperczyk/32/81_2.png) [@TKasperczyk](https://forum.genieacs.com/u/TKasperczyk)\
**Post date:** [September 6, 2019, 6:26pm UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/7 "2019-09-06T18:26:23Z")

</div>

@breakiboy You’d have to download the whole repository, edit lib/extensions.ts and then recompile it.  
I can give you a simple workaround (it’s pretty dirty, though): you can actually edit the binary file directly. Search for a file called **genieacs-cwmp** in your filesystem, edit it and add the mentioned fix. In my case it was in _/usr/local/lib/node\_modules/genieacs/bin/_ . Don’t be scared by the fact that there are some non-readable binary data at the beginning of the file, just skip it. The whole Nodejs code resides there in a minified cleartext form.

 ![1](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/82e0cae7ce8c39923444008618463489fba135e3.png)

---

<div class="post-metadata">

**Author:** ![breakiboy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/breakiboy/32/605_2.png) [@breakiboy](https://forum.genieacs.com/u/breakiboy)\
**Post date:** [September 9, 2019, 11:28am UTC](https://forum.genieacs.com/t/spawn-bin-genieacs-ext-enoent-1-2-beta-0/205/8 "2019-09-09T11:28:08Z")

</div>

oh thx dude, I will try it in the next days. Really thank you for the fast response.
