mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-24 17:41:03 +01:00
This commit is contained in:
@@ -6,23 +6,9 @@ touch /tmp/install.lock
|
||||
# lock
|
||||
touch /tmp/install-nodejs.lock
|
||||
|
||||
# install nvm
|
||||
BASE_DIR=`dirname $0`
|
||||
/bin/bash ${BASE_DIR}/install-nvm.sh
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
# install Node.js v10.19
|
||||
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
|
||||
nvm install 10.19
|
||||
|
||||
# create soft links
|
||||
ln -s $HOME/.nvm/versions/node/v10.19.0/bin/npm /usr/local/bin/npm
|
||||
ln -s $HOME/.nvm/versions/node/v10.19.0/bin/node /usr/local/bin/node
|
||||
|
||||
# environments manipulation
|
||||
export NODE_PATH=$HOME.nvm/versions/node/v10.19.0/lib/node_modules
|
||||
export PATH=$NODE_PATH:$PATH
|
||||
# install node.js
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
||||
apt install -y nodejs
|
||||
|
||||
# install chromium
|
||||
# See https://crbug.com/795759
|
||||
|
||||
Reference in New Issue
Block a user