xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

yarn clear cache All In One

yarn clear cache All In One

Arguments: 
  /usr/local/bin/node /usr/local/Cellar/yarn/1.22.10/libexec/bin/yarn.js add --exact react react-dom react-scripts cra-template --cwd /Users/xgqfrms/Documents/gitlab-projects/dap-monitor-config/monitor-config

PATH: 
  /Users/xgqfrms/node_modules/.bin:/Users/xgqfrms/bin:/usr/local/bin:/Users/xgqfrms/.nvm/versions/node/v14.15.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/xgqfrms/bin:/Users/xgqfrms/.nvm/versions/node/v14.15.5/bin:/Users/xgqfrms/.cargo/bin

Yarn version: 
  1.22.10

Node version: 
  12.18.0

Platform: 
  darwin x64

Trace: 
  SyntaxError: /Users/xgqfrms/Library/Caches/Yarn/v6/npm-@npmcli-move-file-1.1.2-1a82c3e372f7cae9253eb66d72543d6b8685c674-integrity/node_modules/@npmcli/move-file/.yarn-metadata.json: Unexpected end of JSON input
      at JSON.parse (<anonymous>)
      at /usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:1625:59
      at Generator.next (<anonymous>)
      at step (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:310:30)
      at /usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:321:13

npm manifest: 
  {
    "name": "monitor-config",
    "version": "0.1.0",
    "private": true
  }

yarn manifest: 
  No manifest

Lockfile: 
  # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
  # yarn lockfile v1
  

// ...other logs (too long, not paste here)

Q: after run one of bellow commands, I got the yarn-error.log file

$ npx create-react-app monitor-config

$ npm init react-app monitor-config

$ yarn create react-app monitor-config

env

$ node -v
v12.18.0

$ npm -v
6.14.4

$ yarn -v
1.22.10

solution

$ npm uninstall -g create-react-app

# ✅
$ yarn global remove create-react-app
      

https://create-react-app.dev/docs/getting-started/#creating-an-app

$ yarn cache clean 

$ yarn cache clean --mirror

$ yarn cache clean --all
      

https://yarnpkg.com/cli/cache/clean

https://classic.yarnpkg.com/en/docs/cli/cache/

refs

https://github.com/facebook/create-react-app/issues/11191



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-07-08 18:03  xgqfrms  阅读(422)  评论(4编辑  收藏  举报