Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Use npm run install-node-dependencies

Chocobozzz29f55e91151b
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 3df9519318..566d8c3f78 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -84,7 +84,7 @@ yarn install --pure-lockfile
Note that development is done on the `develop` branch. If you want to hack on
PeerTube, you should switch to that branch. Also note that you have to repeat
-the `yarn install --pure-lockfile` command.
+the `npm run install-node-dependencies` command.
When you create a new branch you should also tell to use your repo for upload
not default one. To do just do:
diff --git a/.gitpod.yml b/.gitpod.yml
index be85b87e40..8b377687e2 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -16,5 +16,5 @@ tasks:
before: export NODE_CONFIG="{\"import\":{\"videos\":{\"torrent\":{\"enabled\":false}}},\"webserver\":{\"hostname\":\"$(gp url 3000 | cut -d/ -f3)\",\"port\":\"443\",\"https\":true}}"
init: >
psql -h localhost -d postgres --file=support/docker/gitpod/setup_postgres.sql &&
- yarn install --pure-lockfile
+ npm run install-node-dependencies
command: npm run build:server && npm run dev
diff --git a/server/scripts/upgrade.sh b/server/scripts/upgrade.sh
index 6e72e37cf5..44ea47a83c 100755
--- a/server/scripts/upgrade.sh
+++ b/server/scripts/upgrade.sh
@@ -78,8 +78,7 @@ RELEASE_PAGE_URL="https://github.com/Chocobozzz/PeerTube/releases/tag/${VERSION}
LATEST_VERSION_DIRECTORY="$PEERTUBE_PATH/versions/peertube-${VERSION}"
cd "$LATEST_VERSION_DIRECTORY"
-# Launch yarn to check if we have all required dependencies
-NOCLIENT=1 yarn install --production --pure-lockfile
+NOCLIENT=1 npm run install-node-dependencies -- --production
OLD_VERSION_DIRECTORY=$(readlink "$PEERTUBE_PATH/peertube-latest")
diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md
index 7a594124e4..1124a7be60 100644
--- a/support/doc/dependencies.md
+++ b/support/doc/dependencies.md
@@ -110,7 +110,7 @@ sudo yum update
sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make wget redis git devtoolset-7
```
-5. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-7.
+5. You need to use a more up to date version of G++ in order to run the `npm run install-node-dependencies` command, hence the installation of devtoolset-7.
```sh
sudo scl enable devtoolset-7 bash
@@ -119,7 +119,7 @@ sudo scl enable devtoolset-7 bash
Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
```sh
-sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ yarn install --production --pure-lockfile
+sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ npm run install-node-dependencies -- --production
```
6. Initialize the PostgreSQL database:
diff --git a/support/doc/development/release.md b/support/doc/development/release.md
index 7ec21e12df..4013a007bc 100644
--- a/support/doc/development/release.md
+++ b/support/doc/development/release.md
@@ -8,12 +8,12 @@
* Check migrations:
```
npm run clean:server:test
-git checkout master && rm -r ./node_modules && yarn install --pure-lockfile && npm run build:server
+git checkout master && rm -r ./node_modules && npm run install-node-dependencies && npm run build:server
NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup
-git checkout develop && rm -r ./node_modules && yarn install --pure-lockfile && npm run build:server
+git checkout develop && rm -r ./node_modules && npm run install-node-dependencies && npm run build:server
NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup
```
- * Run `rm -rf node_modules && rm -rf client/node_modules && yarn install --pure-lockfile && npm run build` to see if all the supported languages compile correctly
+ * Run `rm -rf node_modules && rm -rf client/node_modules && npm run install-node-dependencies && npm run build` to see if all the supported languages compile correctly
* Update https://peertube2.cpy.re and check it works correctly
* Check CI tests are green
* Run BrowserStack **and** local E2E tests
diff --git a/support/doc/production.md b/support/doc/production.md
index 8278e1ca33..71b5d9ee06 100644
--- a/support/doc/production.md
+++ b/support/doc/production.md
@@ -95,7 +95,7 @@ Install Peertube:
```bash
cd /var/www/peertube
sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
-cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile
+cd ./peertube-latest && sudo -H -u peertube npm run install-node-dependencies -- --production
```
### :wrench: PeerTube configuration
@@ -336,7 +336,7 @@ Install node dependencies:
```bash
cd /var/www/peertube/versions/peertube-${VERSION} && \
- sudo -H -u peertube yarn install --production --pure-lockfile
+ sudo -H -u peertube npm run install-node-dependencies -- --production
```
Copy new configuration defaults values and update your configuration file:
diff --git a/support/docker/production/Dockerfile.bookworm b/support/docker/production/Dockerfile.bookworm
index afeb9ecec3..bf879c71b0 100644
--- a/support/docker/production/Dockerfile.bookworm
+++ b/support/docker/production/Dockerfile.bookworm
@@ -29,14 +29,14 @@ USER peertube
# Install manually client dependencies to apply our network timeout option
RUN if [ "${ALREADY_BUILT}" = 0 ]; then \
- cd client && yarn install --pure-lockfile --network-timeout 1200000 && cd ../ \
- && yarn install --pure-lockfile --network-timeout 1200000 \
+ cd client && npm run install-node-dependencies -- --network-timeout 1200000 && cd ../ \
+ && npm run install-node-dependencies -- --network-timeout 1200000 \
&& npm run build; \
else \
echo "Do not build application inside Docker because of ALREADY_BUILT build argument"; \
fi; \
rm -rf ./node_modules ./client/node_modules ./client/.angular \
- && NOCLIENT=1 yarn install --pure-lockfile --production --network-timeout 1200000 --network-concurrency 20 \
+ && NOCLIENT=1 npm run install-node-dependencies -- --production --network-timeout 1200000 --network-concurrency 20 \
&& yarn cache clean
USER root