Last active
October 25, 2018 20:32
-
-
Save FrankKerrigan/ef5ce3004e3174a27e1b08518c860620 to your computer and use it in GitHub Desktop.
Shebang Issues and running Node NPM YARN for FESK on Windowa 10 Linux Sub System
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script installs various stuff to help run YARN stuff on windows 10 | |
# Developed as could not run "yarn add @fesk/scripts --dev" due to issues with shebangs #! | |
# First install Windows subsystem on Windows 10 | |
# Install Ubuntu 18.X | |
# Need Root privs to run this. | |
# sudo -i | |
# Update your system after install | |
apt-get update | |
apt-get upgrade | |
# install NPM | |
apt install npm | |
# check we can see npm from non root user | |
npm -v | |
# if you get this then you need to fix your path | |
#: not foundram Files/nodejs/npm: 3: /mnt/c/Program Files/nodejs/npm: | |
#: not foundram Files/nodejs/npm: 5: /mnt/c/Program Files/nodejs/npm: | |
#/mnt/c/Program Files/nodejs/npm: 6: /mnt/c/Program Files/nodejs/npm: Syntax error: word unexpected (expecting "in") | |
# If this fail with errors, Path will need to be updated | |
# Path will look something like this. | |
# PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" | |
# Node Installed with NPM | |
# apt install nodejs | |
node -v | |
# in Ubuntu 17+ remove cmdtest as this has a "yarn" cmd; but not the one you are looking for | |
apt remove cmdtest | |
# set system so you can find and install yarn | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
#install yarn | |
sudo apt-get update && sudo apt-get install yarn | |
yarn -v | |
# Note you may have to uppdate your PATH in .profile to match root path. | |
# root> env ## take path and put this in .profile. | |
## DONE ! happy yarning ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment