2

So I'm getting this error when I try to do a yarn install. I can yarn start without issue but i'm not sure if it's causing an issue behind the scenes so i'd like to resolve it.

TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1599160669280'
at YarnRegistry.<anonymous> (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:96344:30)
at Generator.next (<anonymous>)
at step (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:310:30)
at /usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:328:14
at new Promise (<anonymous>)
at new F (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:5301:28)
at YarnRegistry.<anonymous> (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:307:12)
at YarnRegistry.saveHomeConfig (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:96351:20)
at Install.<anonymous> (/usr/local/Cellar/yarn/1.22.5/libexec/lib/cli.js:7930:35)
at Generator.next (<anonymous>)

i've tried deleting my yarn.lock and basically every file i could find that had yarn in it and reinstalling. I've tried installing yarn through yvm instead of brew. None of these things have had any affect.

Any help is greatly appreciated.

RobC
  • 22,977
  • 20
  • 73
  • 80
user1218336
  • 21
  • 1
  • 3

2 Answers2

4

Have you tried removing the ~/.yarnrc file? I had a corrupted .yarnrc file that was preventing me from installing.

Running this should remove your yarnrc.

rm ~/.yarnrc

Experienced this issue with WSL but it should be applicable in other cases.

I also submitted and later resolved an issue 8469

fengelhardt
  • 965
  • 11
  • 24
0

This is what I have got with the brewed yarn (v1.22.5):

installation test

  • yarn init
  • yarn add test
$ yarn init
yarn init v1.22.5
question name (brew-test):
question version (1.0.0):
question description:
question entry point (index.js):
question repository url:
question author:
question license (MIT):
question private:
success Saved package.json
✨  Done in 2.16s.
$ yarn add test
yarn add v1.22.5
info No lockfile found.
[1/4]   Resolving packages...
[2/4]   Fetching packages...
[3/4]   Linking dependencies...
[4/4]   Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ test@0.6.0
info All dependencies
├─ ansi-font@0.0.2
└─ test@0.6.0
✨  Done in 0.55s.

brew config

$ brew config
HOMEBREW_VERSION: 2.5.0-123-g58cb2ce
ORIGIN: git@github.com:Homebrew/brew.git
HEAD: 58cb2ce5bc1bb262c168483024bf80b147a0e86f
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core.git
Core tap HEAD: 4421467f40a0eb970135644cfb4c403df015a43f
Core tap last commit: 6 minutes ago
Core tap branch: bzt-1.5.0
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.QcT5vipIW7/org.macosforge.xquartz:0
HOMEBREW_EDITOR: vim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 11.0 build 1100
Git: 2.27.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 11.0.6, 1.8.0_265, 1.8.0_192, 1.8.0_181, 1.8.0_65
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: 11.2.1
XQuartz: 2.7.11 => /opt/X11
chenrui
  • 8,910
  • 3
  • 33
  • 43