Compose parse syntax error
- Code Connect CLI version: 1.0.0
- Operating system: macOS Ventura: Version 13.4
- Code Connect file: Private
When running create and publish, we are getting this error:
SyntaxError: Unexpected token 'S', StartParam"... is not valid JSON.
It it erroring on this line.
FWIW, when running the create command, it does generate the file but it still produces that error. However, when running the publish command, it does not publish the component.
Hi @HaleyWardo , can you share your Code Connect file/code with Figma support in order for us to investigate further please.
@rrabherufigma Hey, I'M facing a similar issue when running the publish command and also when running the parse command. Here is the output:
Command: figma connect parse
Config file found, parsing [...] using specified include globs
undefined:1
configuration ':app:androidApis'
^
SyntaxError: Unexpected token 'c', "configurat"... is not valid JSON
at JSON.parse (<anonymous>)
at ChildProcess.<anonymous> (/Users/fet/.nvm/versions/node/v20.2.0/lib/node_modules/@figma/code-connect/dist/connect/parser_executables.js:101:34)
at ChildProcess.emit (node:events:511:28)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
Node.js v20.2.0
It seems some Gradle build output is in place of the expected JSON. Also, I have some custom output in the Gradle build which was also present in the error message initially, but I removed this output in order to test Code Connect.
Hey @fixilein, we've had a report of a somewhat similar issue from another user. We think it's related to something in your build.gradle adding extra output to the console, though we're still investigating. We'll follow up when we have something for you to try here, apologies for the issues!