# \[APP CLI\]TypeError: string.replace is not a function

**URL:** <https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301>\
**Category:** Apps\
**Tags:** homey-pro\
**Created:** [July 26, 2023, 10:14am UTC](https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301 "2023-07-26T10:14:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Viktoriia\_Gainulina](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/viktoriia_gainulina/32/79872_2.png) [@Viktoriia\_Gainulina](https://community.homey.app/u/Viktoriia_Gainulina)\
**Post date:** [July 26, 2023, 10:14am UTC](https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301/1 "2023-07-26T10:14:19Z")

</div>

Hi there,

I faced with follow problem:  
I have the Homey Pro 2019 and I am using Windows 7 SP1, Nodejs version 16.20.1 installed and Homey CLI version 3.0.2.  
I was able to create a Homey app and install it on the Homey today morning 🙂 But right after that I tried to create and install one more app. After calling homey app install I’ve received the error `string.replace is not a function` and no more logs.

Maybe someone already faced with such problem and have a solution? What does it could be?  
I am aware that I should be updating my OS and use newer versions 😃

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/f/0f58357917092d866abad62f4f4d4a6a29df2264.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 26, 2023, 10:46am UTC](https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301/2 "2023-07-26T10:46:56Z")

</div>

It’s difficult to say exactly, but it’s likely caused by a dependency of `homey` that is “too new” for your environment.

Perhaps it’s possible to revert back to an older version of `homey` (`npm install homey@2`), although that might cause other issues.

---

<div class="post-metadata">

**Author:** ![Viktoriia\_Gainulina](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/viktoriia_gainulina/32/79872_2.png) [@Viktoriia\_Gainulina](https://community.homey.app/u/Viktoriia_Gainulina)\
**Post date:** [July 26, 2023, 1:16pm UTC](https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301/3 "2023-07-26T13:16:19Z")

</div>

It’s super strange and don’t ask me how I came to this, but…  
in folder figures(which is in homey → node\_modules folder) I found some condition for unicode symbols  
`const figures = platform === 'win32' ? windows : main;`

changing `win32` to `win64` solved the problem  
still…it’s temporary solution, but at least it works 😃

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 26, 2023, 1:29pm UTC](https://community.homey.app/t/app-cli-typeerror-string-replace-is-not-a-function/85301/4 "2023-07-26T13:29:14Z")

</div>

Strange, since `win64` isn’t supposed to be a valid value according to the [Node.js documentation](https://nodejs.org/api/os.html#osplatform) 😅
