php - TypeError: Cannot create property 'lastUpdateCheck' on string 'lastUpdateCheck 1599160669280'

Solution:

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

Answer

Solution:

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

Source