ANeacșu964237 (Community Member) asked a question.

What versions of Yarn does srcclr support?

I am trying to upgrade to Yarn v3 which changed the yarn.lock file a bit. Now SRCCLR is failing with message "Unexpected level of indentation: 6. Line: ' optional: true'."

 

What versions of Yarn does SRCCLR support?


    • ANeacșu964237 (Community Member)

      I have reviewed the Supported Languages. Yarn version is not mentioned.

       

      Did you read my question?

  • Hi @ANeacșu964237 (Community Member)​ ,

     

    I apologize for the miss-communication

    I was talking to a team member and they suggest to regenerate the yarn.lock file...

    From the error it seems like it's corrupted or something. Maybe the upgrade threw the indentation off.

     

    Thank you,

    Steven

     

    Expand Post
  • ANeacșu964237 (Community Member)

    The yarn.lock file is not corrupted. The project runs and builds correctly.

     

    Yarn 3 migration guide even has a step to migrate the lock file from the old format to the new:

    https://yarnpkg.com/getting-started/migration#step-by-step

     

    It adds a new level of indentation that perhaps SourceClear doesn't interpret correctly, expecting the lock file to only include 2 levels of indentation.

     

    Example yarn.lock for Yarn 1:

     

    ```

    "some-dependency@^1.0.0":

     version "1.0.0"

     resolved "..."

     integrity sha512-/...

     dependencies:

       "sub-dependency" "^1.0.0"

    ```

     

    Example yarn.lock for Yarn 3:

     

    ```

    "some-dependency@npm:^1.0.0":

      version: 1.0.0

      resolution: "some-dependency@npm:1.0.0"

     dependencies:

      "sub-dependency": ^1.0.0

     peerDependencies:

      react: ^16.8.0 || ^17.0.0

     peerDependenciesMeta:

       react:

         optional: true <-------- 6 spaces indentation

     checksum: ...

     languageName: node

     linkType: hard

    ```

     

    SourceClear CI step output:

     

    ```

    Veracode SCA agent scanning engine ready

    Running the Yarn scanner

    Processing results...

    Processing results complete

     

    Unexpected level of indentation: 6. Line: ' optional: true'.

     

     

    Exited with code exit status 1

    ```

    Expand Post

Topics (0)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.