Troubleshooting Error "/usr/share/yarn/lib/cli.js:45726" with yarn

While trying to install yarn, you might encounter a SyntaxError: Unexpected token issue referring to /usr/local/lib/node_modules/yarn/lib/cli.js:45726.

According to the related GitHub issue, the problem occurs when your environment meets both the below conditions:

  1. yarn version is v1.13.0
  2. Node.js is lower than v6

Solution

  • Upgrade the version of Node.js

  • Upgrade the version of yarn

You should no longer see the issue when building.

Was this article helpful?
6 out of 16 found this helpful

Comments

0 comments

Article is closed for comments.