NodeJS Common Fix Command On Linux Or Windows

Linux

# add new repository
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update -y
sudo apt install libgtk-3-0 -y
sudo apt install software-properties-common checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev build-essential libncurses5-dev libgmp-dev libnss3-dev wget -y

# nodejs additional packages
npm install --global lerna node-pre-gyp typescript

# python 2.7
sudo apt install python-minimal -y
sudo apt install python-pip -y

# Install
npm --build-from-source install

# Fix Chrome Sandbox
sudo chown root:root node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 node_modules/electron/dist/chrome-sandbox

# run
sudo npm run start

Windows

  • install Visual Studio Installer
  • npm config set msvs_version 2017 --global
    npm i electron-builder-squirrel-windows electron-builder node-gyp electron electron-rebuild -g
    node-gyp configure --msvs_version=2017
    npm install --global --production windows-build-tools
    npm install
    

    Comments

    Popular posts from this blog

    Find Backlink From Google Dork

    List of weapon buff materials, effects and how it can be durango wild lands

    Install deb package via Termux