...
Pour installer les dépendances, il faut en premier installer nodejs, npm et yarmyarn. L'installation ne fonctionne pas avec nodejs 12.x
La référence est ici: https://github.com/nodesource/distributions
| Bloc de code |
|---|
(django_pod3) pod@pod:~/django_projects/podv3$ curlsudo -sL https://deb.nodesource.com/setup_18.x | sudo bash -apt-get update (django_pod3) pod@pod:~/django_projects/podv3$ sudo apt-get install -y ca-certificates curl gnupg (django_pod3) pod@pod:~/django_projects/podv3$ sudo aptmkdir install nodejs-p /etc/apt/keyrings (django_pod3) pod@pod:~/django_projects/podv3$ curl -sSfsSL https://dldeb.yarnpkgnodesource.com/debian/pubkey.gpg | sudo apt-key add -/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg (django_pod3) pod@pod:~/django_projects/podv3$ NODE_MAJOR=18 && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://dldeb.yarnpkgnodesource.com/debian/ stablenode_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/yarnnodesource.list (django_pod3) pod@pod:~/django_projects/podv3$ sudo apt update && apt install -y nodejs (django_pod3) pod@pod:~/django_projects/podv3$ sudo apt install yarncorepack enable |
| Info | ||
|---|---|---|
| ||
Alternativement, si vous êtes sur CentOS 8, installez les dépendances nodejs+npm et yarn ainsi : root@pod:~/$ dnf module reset nodejs root@pod:~/$ dnf module enable nodejs:14 root@pod:~/$ dnf module -y update nodejs root@pod:~/$ yum install nodejs root@pod:~/$ npm install yarn -g |
Se placer dans le répertoire où est installé le package.json
...