-
Notifications
You must be signed in to change notification settings - Fork 17
Uncaught SyntaxError: Unexpected token C in JSON at position 0 #44
Comments
Hi @sumyapp, How many times did this error occur? I want to know that this error has occurred every time or sometimes. And let me know where rubocop is installed (e.g. run Thank you |
Thanks for the reply. Every time.
And, this is my configure.
|
@sumyapp Thank you for your investigation. Quick fix is you change rubocopCommandPath configuration to If you want to use bundle exec strongly, I will be able to apply it. Do you want? |
Thank you for telling me. The output errors are as follows.
I am using multiple versions of Ruby. Also, I use multiple versions of RuboCop. |
I got it. If you launch Atom on terminal (this meaning is Atom knows PATH environment), You do not need to set rubocopCommandPath. I also use multiple ruby environments in rbenv. However, rbenv can automatically resolve path of rubocop command. |
I can not make enough time to verify, so I give up once. I am very sorry. my new config.cson
launch command
rubocop is installed correctly.
|
Is this it?
|
Hi @sumyapp, Thank you for your response. I believe that the cause is rbenv. process.env.PATH includes But your error messages are I guess that your environment has several ruby version, and your repository ruby version was not installed rubocop command. In other words, your repository has .ruby-version file and selected other ruby versions, I guess. Could you check your ruby version in your repository? Like a below,
Thank you, |
Sorry, I think, RuboCop is installed correctly.
|
I'm seeing this same issue. Using the default rubocop command path (just Using a custom rubocop command path ( As a temporary workaround, just to get it working, I'm manually setting the rubocop path to the one needed for this project:
|
[Enter steps to reproduce:]
Atom: 1.19.7 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: rubocop-auto-correct package 1.5.1
Stack Trace
Uncaught SyntaxError: Unexpected token C in JSON at position 0
Commands
Non-Core Packages
Version
The text was updated successfully, but these errors were encountered: