The support ends on December 2019: https://github.com/nodejs/Release#release-schedule
* nginx
* **PostgreSQL >= 9.6**
* **Redis >= 2.8.18**
- * **NodeJS >= 8.x**
+ * **NodeJS >= 10.x**
* **yarn >= 1.x**
* **FFmpeg >= 3.x**
const app = express()
// ----------- Core checker -----------
-import { checkMissedConfig, checkFFmpeg } from './server/initializers/checker-before-init'
+import { checkMissedConfig, checkFFmpeg, checkNodeVersion } from './server/initializers/checker-before-init'
// Do not use barrels because we don't want to load all modules here (we need to initialize database first)
import { CONFIG } from './server/initializers/config'
process.exit(-1)
})
+checkNodeVersion()
+
import { checkConfig, checkActivityPubUrls } from './server/initializers/checker-after-init'
const errorMessage = checkConfig()
import * as config from 'config'
import { promisify0 } from '../helpers/core-utils'
+import { logger } from '../helpers/logger'
// ONLY USE CORE MODULES IN THIS FILE!
return supportedOptionalEncoders
}
+function checkNodeVersion () {
+ const v = process.version
+ const majorString = v.split('.')[0].replace('v', '')
+ const major = parseInt(majorString, 10)
+
+ logger.debug('Checking NodeJS version %s.', v)
+
+ if (major < 10) {
+ logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v)
+ }
+}
+
// ---------------------------------------------------------------------------
export {
checkFFmpeg,
checkFFmpegEncoders,
- checkMissedConfig
+ checkMissedConfig,
+ checkNodeVersion
}
videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo)
-MOCHA_PARALLEL=true npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \
+npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \
$videosFiles
3. Install certbot (choose instructions for nginx and your distribution) :
[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
- 4. Install NodeJS 8.x:
+ 4. Install NodeJS 10.x:
[https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
5. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):
[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
## CentOS 7
- 1. Install NodeJS 8.x:
+ 1. Install NodeJS 10.x:
[https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
2. Install yarn:
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
```
2. (Optional) Install certbot (choose instructions for nginx and your distribution) :
[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
-3. Install NodeJS 8.x:
+3. Install NodeJS 10.x:
[https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
4. Install yarn:
[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
```
8. Firewall
-By default, you cannot acces your server via public IP. To do so, you must configure firewall:
+By default, you cannot access your server via public IP. To do so, you must configure firewall:
```
# Ports used by peertube dev setup
sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
### Dependencies
Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis.
-PeerTube only supports NodeJS 8.x or 10.x.
+PeerTube only supports NodeJS 10.x.
### Installation
$ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin
```
-### REPL ([Read Eval Print Loop](https://nodejs.org/docs/latest-v8.x/api/repl.html))
+### REPL ([Read Eval Print Loop](https://nodejs.org/docs/latest-v10.x/api/repl.html))
If you want to interact with the application libraries and objects even when PeerTube is not running, there is a REPL for that.
postgresql \
postgresql-contrib \
redis-server \
- && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
+ && curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
-FROM node:8-stretch
+FROM node:10-stretch
# Allow to pass extra options to the npm run build
# eg: --light --light-fr to not build all client languages