particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

Error while Running Particle CLI in Windows #439

Open salmanfarisvp opened 6 years ago

salmanfarisvp commented 6 years ago

I installed the Particle-cli by using the Windows CLI Installer (https://binaries.particle.io/cli/installer/windows/ParticleCLISetup.exe) , installation is completd without occuring an error but when setup particle by typing Particle Setup it throw some error

C:\Users\Faris>particle setup
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'C:\Users\Faris\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:236:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)
monkbroc commented 6 years ago

Have you tried to install particle-cli with npm on this machine before? The error you are getting is from a directory associated with npm.

Do npm remove -g particle-cli then run the CLI installer again.

On Wed, Jul 11, 2018, 5:57 AM Salman Faris notifications@github.com wrote:

I installed the Particle-cli by using the Windows CLI Installer ( https://binaries.particle.io/cli/installer/windows/ParticleCLISetup.exe) , installation is completd without occuring an error but when setup particle by typing Particle Setup it throw some error

C:\Users\Faris>particle setup internal/modules/cjs/loader.js:583 throw err; ^

Error: Cannot find module 'C:\Users\Faris\AppData\Roaming\npm\node_modules\particle-cli\bin\particle.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:236:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/particle-iot/particle-cli/issues/439, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1Kwe6rf4lHupm4PULfDTKH9KbyRsYLks5uFcwWgaJpZM4VK1xl .

salmanfarisvp commented 6 years ago

@monkbroc Thanks for the suggestion . when i do this on Powershell

PS C:\WINDOWS\system32> npm remove -g particle-cli
up to date in 0.118s

and no output in the command prompt

monkbroc commented 6 years ago

Sorry I don't have a series of steps to fix exactly what's going on with your machine. You'll need to figure out why when you type particle it tries to run a script in C:\Users\Faris\AppData\Roaming\npm