# Problem with particle-cli

**URL:** <https://community.particle.io/t/problem-with-particle-cli/40912>\
**Category:** Troubleshooting\
**Created:** [April 7, 2018, 10:23pm UTC](https://community.particle.io/t/problem-with-particle-cli/40912 "2018-04-07T22:23:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mprogers](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mprogers/32/18458_2.png) [@mprogers](https://community.particle.io/u/mprogers)\
**Post date:** [April 7, 2018, 10:23pm UTC](https://community.particle.io/t/problem-with-particle-cli/40912/1 "2018-04-07T22:23:55Z")

</div>

Hi, All:

I installed the particle cli according to the instructions, but when I run it get an error (see below). I have the latest version of npm and node installed:

$ node --version  
v8.11.1  
$ npm --version  
5.6.0

I went into /usr/local/lib/node\_modules/particle-cli and ran npm rebuild, as instructed, but I still get the error shown.

I tried opening a new terminal window and running particle there, same error.

Can someone please help me out?

Thanks!

photons:particle-cli me $ particle setup wifi  
Error loading command /usr/local/lib/node\_modules/particle-cli/commands/SerialCommand.js Error: The module '/usr/local/lib/node\_modules/particle-cli/node\_modules/serialport/build/Release/serialport.node’  
was compiled against a different Node.js version using  
NODE\_MODULE\_VERSION 47. This version of Node.js requires  
NODE\_MODULE\_VERSION 57. Please try re-compiling or re-installing  
the module (for instance, using `npm rebuild` or `npm install`).  
/usr/local/lib/node\_modules/particle-cli/commands/SetupCommand/index.js:68  
return serial.configureWifi();  
^

TypeError: Cannot read property ‘configureWifi’ of undefined  
at SetupCommand.setup (/usr/local/lib/node\_modules/particle-cli/commands/SetupCommand/index.js:68:17)  
at SetupCommand.runCommand (/usr/local/lib/node\_modules/particle-cli/commands/BaseCommand.js:108:17)  
at Interpreter.runCommand (/usr/local/lib/node\_modules/particle-cli/lib/interpreter.js:93:13)  
at Interpreter.handle (/usr/local/lib/node\_modules/particle-cli/lib/interpreter.js:55:18)  
at Object. (/usr/local/lib/node\_modules/particle-cli/bin/particle.js:20:5)  
at Module.\_compile (module.js:652:30)  
at Object.Module.\_extensions…js (module.js:663:10)  
at Module.load (module.js:565:32)  
at tryModuleLoad (module.js:505:12)  
at Function.Module.\_load (module.js:497:3)

---

<div class="post-metadata">

**Author:** ![nrobinson2000](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/nrobinson2000/32/15624_2.png) [@nrobinson2000](https://community.particle.io/u/nrobinson2000)\
**Post date:** [April 7, 2018, 11:09pm UTC](https://community.particle.io/t/problem-with-particle-cli/40912/2 "2018-04-07T23:09:46Z")

</div>

Have you tried this?

```auto
sudo npm uninstall -g --unsafe-perm particle-cli
sudo npm install -g --unsafe-perm particle-cli

```

---

<div class="post-metadata">

**Author:** ![mprogers](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mprogers/32/18458_2.png) [@mprogers](https://community.particle.io/u/mprogers)\
**Post date:** [April 8, 2018, 2:52am UTC](https://community.particle.io/t/problem-with-particle-cli/40912/3 "2018-04-08T02:52:03Z")

</div>

I tried the second line, and still got grief – but on my home computer I ran both and particle seems fine, so a) thank you for the suggestion, and b) I will try it again at work on Monday.
