Error parsing file \Users\Admin\.particle\profile.json: SyntaxError: Unexpected token

Hi,

I’m having problems getting Particle CLI working on a Windows 10 machine.

I’ve tried installing/uninstalling everything several times but always get this error.

C:\Users\Admin>particle
 !   Error in particle-cli:
 !   Error parsing file \Users\Admin\.particle\profile.json: SyntaxError: Unexpected token
 !   See C:\Users\Admin\AppData\Local\particle\error.log for more info.

Here’s the full error from the log file.

2018/04/17 07:39:31 Error: Error parsing file \Users\Admin\.particle\profile.json: SyntaxError: Unexpected token 
    at Object.settings.readProfileData (C:\Users\Admin\AppData\Local\particle\node_modules\particle-cli\settings.js:197:10)
    at Object.settings.whichProfile (C:\Users\Admin\AppData\Local\particle\node_modules\particle-cli\settings.js:173:11)
    at CLI.run (C:\Users\Admin\AppData\Local\particle\node_modules\particle-cli\dist\app\cli.js:208:12)
    at Object.<anonymous> (C:\Users\Admin\AppData\Local\particle\node_modules\particle-cli\bin\particle.js:6:11)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

Anybody got any ideas?

Cheers,
Paul

Are you trying the manual install, or the windows installer? I’d recommend the latter if you haven’t tried that yet.

It seems that the profile.json file was corrupt. I deleted it and tried again and it worked.

1 Like