Uživatelské nástroje

Nástroje pro tento web


linux:yarn

Yarn

Instalace

https://classic.yarnpkg.com/lang/en/docs/install/#centos-stable

$ curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

pred vlastni instalaci yarn je nutny mit nainstalovany node

$ curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash -

Tips

npx create-react-app my-app alternativa

vanila JS

$ yarn create react-app my-app

TypeScript

$ yarn create react-app my-app --template typescript

PWA

Od Reactu 17+ neni ve vychozi sablone workbox povoleny

$ yarn create react-app my-app --template pwa[-typescript]

yarn create insufficient permissions

Pokud je chyba podobna teto

$ yarn create react-app monster-rolodex
yarn create v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@5.0.0" with binaries:
      - create-react-app
error Cannot create "/usr/local/bin/create-react-app" due to insufficient permissions.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

oprava je nasledujici

$ yarn config set prefix ~/.local
yarn config v1.22.17
success Set "prefix" to "/home/nost/.local".
Done in 0.15s.
linux/yarn.txt · Poslední úprava: 2022/01/06 13:30 autor: nost23