# \[HOW TO\] CLI install method

**URL:** <https://community.homey.app/t/how-to-cli-install-method/198>\
**Category:** Tutorials\
**Tags:** homey-pro\
**Created:** [August 23, 2018, 1:18pm UTC](https://community.homey.app/t/how-to-cli-install-method/198 "2018-08-23T13:18:12Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Ralf74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ralf74/32/20986_2.png) [@Ralf74](https://community.homey.app/u/Ralf74)\
**Post date:** [January 29, 2020, 6:20pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/47 "2020-01-29T18:20:56Z")

</div>

Firewall is now deactivated, Antivirus tool, too.  
“Incorrect header check” - like yesterday

 ![Unbenannt5](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/0/f0f99016dc623b55094c8ee4652caa0ae972da14.jpeg)

---

<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:** [January 30, 2020, 7:44am UTC](https://community.homey.app/t/how-to-cli-install-method/198/48 "2020-01-30T07:44:24Z")

</div>

“Incorrect header check” suggests that either the archive file that is generated (and which contains the app code) is invalid, or there’s an issue with the HTTP response compression. Both issues are very strange (but I don’t use Windows so don’t know if it’s a generic Windows issue, or it has something to do with your specific setup).

---

<div class="post-metadata">

**Author:** ![Ralf74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ralf74/32/20986_2.png) [@Ralf74](https://community.homey.app/u/Ralf74)\
**Post date:** [January 30, 2020, 6:53pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/49 "2020-01-30T18:53:27Z")

</div>

My homey is Brand new and nearly blank. Only some Apps are installated, no flows are created…

So maybe, i think there is an incompatibility between Mapulo Devolo App - and homey firmware version. Github file is older…

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/c/7c8c0be603c1e46b545b0d1de5722ad6f2fa59cb.jpeg)

Did anyone have a idea? Maybe i will ask Mapulo…

---

<div class="post-metadata">

**Author:** ![Ralf74](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ralf74/32/20986_2.png) [@Ralf74](https://community.homey.app/u/Ralf74)\
**Post date:** [January 30, 2020, 6:57pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/50 "2020-01-30T18:57:26Z")

</div>

I think CLI installation issue is solved for the Moment.

Thanks for you help, Folks!

---

<div class="post-metadata">

**Author:** ![WT\_hh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wt_hh/32/20510_2.png) [@WT\_hh](https://community.homey.app/u/WT_hh)\
**Post date:** [March 18, 2020, 9:53am UTC](https://community.homey.app/t/how-to-cli-install-method/198/51 "2020-03-18T09:53:02Z")

</div>

install homey failed 🤪

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/b/7bcb2f1de399f758af49867c06ffa3ecd0a7e2df.png)

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [March 18, 2020, 5:59pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/52 "2020-03-18T17:59:40Z")

</div>

did you try the examples as mentioned before in this tread?  
see [[HOW TO] CLI install method](https://community.homey.app/t/how-to-cli-install-method/198/45) and before

---

<div class="post-metadata">

**Author:** ![WT\_hh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wt_hh/32/20510_2.png) [@WT\_hh](https://community.homey.app/u/WT_hh)\
**Post date:** [March 19, 2020, 3:33am UTC](https://community.homey.app/t/how-to-cli-install-method/198/53 "2020-03-19T03:33:09Z")

</div>

I tryed that, and my npm version is 6.14.2，node is 12.16.1, but it still doesn`t work…

---

<div class="post-metadata">

**Author:** ![Tom1989](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom1989/32/13626_2.png) [@Tom1989](https://community.homey.app/u/Tom1989)\
**Post date:** [August 3, 2020, 7:52pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/55 "2020-08-03T19:52:07Z")

</div>

Hi!  
I’m new in the command line and tried to install the devolo app from mapulu.

Can someone tell me, what I can do:

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/1/113c9c021a01ad6b4760b9171c536fdc81d9e1f6.png)

Also tried the examples above, but there’s always the same errors.

Edit: Homey node.js version is: 12.16.1 and I downloaded 12.18.3

Thanks!

---

<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:** [August 3, 2020, 7:56pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/56 "2020-08-03T19:56:22Z")

</div>

Looks like you’re using a proxy or a firewall that’s blocking access to the NPM repository.

---

<div class="post-metadata">

**Author:** ![Tom1989](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom1989/32/13626_2.png) [@Tom1989](https://community.homey.app/u/Tom1989)\
**Post date:** [August 3, 2020, 8:33pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/57 "2020-08-03T20:33:26Z")

</div>

Thanks @robertklep it was my firewall. I had to uninstall…

Now it worked untill I want to install the devolo app:

I unpacked the files to the desktop. What could be wrong?? Do I have to rename the file, or type the name of the file in the cmd?

![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/2/f2b0b69d81aaeba1f1acdfc868e9ecfe55a4e4b0.png)

thanks!

---

<div class="post-metadata">

**Author:** ![Tom1989](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tom1989/32/13626_2.png) [@Tom1989](https://community.homey.app/u/Tom1989)\
**Post date:** [August 3, 2020, 8:36pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/58 "2020-08-03T20:36:34Z")

</div>

… now i got it…

didn’t type cd cm.decolo-alpha…

---

<div class="post-metadata">

**Author:** ![MRK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MRK](https://community.homey.app/u/MRK)\
**Post date:** [August 7, 2020, 12:42pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/59 "2020-08-07T12:42:31Z")

</div>

Hi all,

I think something whent wrong somewhere. Getting this message.  
What could be wrong?

Already installed it, but didn’t work so i removed it and installed it again.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/8/e8b5776ab4af3a763fd7bf9ef44e5ac209d9c6f1.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:** [August 7, 2020, 1:07pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/60 "2020-08-07T13:07:25Z")

</div>

Please follow the exact instructions [from the first post](https://community.homey.app/t/how-to-cli-install-method/198/1). The correct command is:

```auto
npm install -g homey

```

---

<div class="post-metadata">

**Author:** ![MRK](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@MRK](https://community.homey.app/u/MRK)\
**Post date:** [August 7, 2020, 1:23pm UTC](https://community.homey.app/t/how-to-cli-install-method/198/61 "2020-08-07T13:23:51Z")

</div>

Thanks, worked now!

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [August 19, 2020, 8:07am UTC](https://community.homey.app/t/how-to-cli-install-method/198/62 "2020-08-19T08:07:52Z")

</div>

Hi @robertklep,  
I suppose you use a Mac, too, right?  
The CLI method and also the use of the terminal is new to me, but according to the information here, it should not be a problem. It shouldn’t be a problem… But…

The installation of node.js (v. 14.8.0) worked without problems.  
But when I execute the command **npm install -g homey** I get some error messages because I don’t have the necessary write permissions. But I am logged in as admin. What can I do?  
I use macOS Catalina v. 10.15.6 (should this be relevant).

---

<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:** [August 19, 2020, 8:11am UTC](https://community.homey.app/t/how-to-cli-install-method/198/63 "2020-08-19T08:11:33Z")

</div>

If you’re installing a module as admin, you need to add the `--unsafe-perms` flag:

```auto
npm install -g --unsafe-perms homey

```

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [August 19, 2020, 8:17am UTC](https://community.homey.app/t/how-to-cli-install-method/198/64 "2020-08-19T08:17:51Z")

</div>

Many thanks for the quick feedback.  
I get the same error messages.

```
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
```

---

<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:** [August 19, 2020, 8:23am UTC](https://community.homey.app/t/how-to-cli-install-method/198/65 "2020-08-19T08:23:13Z")

</div>

Oh wait, you wrote _“But I am logged in as admin”_, and I assumed that you ran the `npm` command with `sudo`, but I guess you’re running it as a regular user (that also happens to be an admin).

In that case, the best solution would be to change the ownership of the global `node_modules` directory to your user id:

```auto
sudo chown -R $USER /usr/local/lib/node_modules

```

After that, you should be install to install global modules as a regular (admin) user (and you don’t need `--unsafe-perm`).

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [August 19, 2020, 8:52am UTC](https://community.homey.app/t/how-to-cli-install-method/198/66 "2020-08-19T08:52:44Z")

</div>

> [@robertklep](#):
>
> Oh wait, you wrote _“But I am logged in as admin”_ , and I assumed that you ran the `npm` command with `sudo` , but I guess you’re running it as a regular user (that also happens to be an admin).

At least that’s what I thought.

Something has changed, but I still don’t seem to have write access, at least not to the named files.

```
Dirks-MacBook-Pro:~ goebeldi$ npm install -g homey
npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/homey/bin/homey.js
npm ERR! dest /usr/local/bin/homey
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/homey/bin/homey.js' -> '/usr/local/bin/homey'
npm ERR! [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/homey/bin/homey.js' -> '/usr/local/bin/homey'] {
npm ERR! cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/homey/bin/homey.js' -> '/usr/local/bin/homey'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/homey/bin/homey.js',
npm ERR! dest: '/usr/local/bin/homey'
npm ERR! },
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/homey/bin/homey.js',
npm ERR! dest: '/usr/local/bin/homey'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/goebeldi/.npm/_logs/2020-08-19T08_30_29_752Z-debug.log

```

Do you use also Catalina v10.15 (or higher)?  
I found this [link](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md) on the official [nodejs.org](http://nodejs.org). If I understand it correctly, there are some problems with Catalina and node.js, right? However, the topics “programming” and “node.js” are a new world for me with lots of question marks. When you know what I mean.

---

<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:** [August 19, 2020, 8:54am UTC](https://community.homey.app/t/how-to-cli-install-method/198/67 "2020-08-19T08:54:37Z")

</div>

Ah, you may have to change the ownership of `/usr/local/bin` as well:

```auto
sudo chown -R $USER /usr/local/bin

```

I don’t use Catalina because of all the “enhancements” that are making life for users and developers much worse.

[Previous page](https://community.homey.app/t/how-to-cli-install-method/198.md?page=2)

[Next page](https://community.homey.app/t/how-to-cli-install-method/198.md?page=4)
