วิธี upgrade Node.js ใน Bash ของ Windows 10 ให้เป็นรุ่นปัจจุบัน

ปัญหาคือ บน Windows 10 เราสามารถใช้ Windows Subsystem for Linux (WSL) หรือ Bash Shell ได้ ซึ่งจริงๆมันก็คือ Ubuntu 16.04.3

แต่ว่า เวลาจะใช้งาน Node.js ติดตั้งพวก Firebase, Angular อะไรพวกนี้ จะทำไม่ได้ เพราะรุ่นที่ให้มามันเก่ามาก

วิธีการคือ (Reference: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)

ใช้คำสั่งต่อไปนี้

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt-get install -y nodejs

ก็เรียบร้อย

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *