Skip to content

SyntaxError: Unexpected token < in JSON at position 1 when I run sfdx force:source:deploy -p force-app #872

Closed

Description

@Patlatus

$ sfdx force:source:deploy -p force-app
*** Deploying with REST ***
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse ()
at Request._callback (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request. (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage. (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse ()
at Request._callback (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request. (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage. (C:\Users\Bohdan\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

I have tried to execute the following commands

rm -f /usr/local/bin/sfdx
rm -rf /usr/local/lib/sfdx
rm -rf ~/.local/share/sfdx
rm -rf ~/.config/sfdx
rm -rf ~/Library/Caches/sfdx
rm -rf /usr/local/heroku
rm -rf /usr/local/sfdx
rm -rf /usr/local/lib/heroku
rm -rf /usr/local/bin/heroku
rm -rf ~/.heroku ~/.local/share/heroku ~/.config/heroku ~/.cache/heroku
rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx

but this didn't help

Activity

  1. Patlatus commented on Feb 24, 2021

    @Patlatus
    Author

    was able to resolve by uninstalling completely and reinstalling

  2. CXCAlfo commented on Feb 25, 2021

    @CXCAlfo

    Hi. @Patlatus when you say uninstalling completely - do you mean CLI SFDX?
    This just happened after i upgraded to sfdx-cli/7.88.4-3b2e55c3f1

  3. AllanOricil commented on Feb 25, 2021

    @AllanOricil

    related #884

  4. AllanOricil commented on Feb 25, 2021

    @AllanOricil

    related #860

  5. Patlatus commented on Feb 26, 2021

    @Patlatus
    Author

    @CXCAlfo Yes, I mean I have uninstalled SFDX CLI completely and reinstalling it again

  6. shetzel commented on Mar 2, 2021

    @shetzel
    Contributor

    Please see #860, which has much more info about this issue. Essentially, this is the switch to the REST API. The workaround is to switch to SOAP. A fix in the latest-rc tag (of sfdx-cli or salesforcedx) allows you to switch to SOAP via the restDeploy SFDX config variable, which is also available as an environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions