在ubuntu中安裝scratch 3 伺服器

參考網址:Linux 技術手札 
 

以下會介紹在 Ubuntu 透過源碼安裝及 apt-get 安裝的步驟:

Ubuntu Repository 安裝:

透過 Ubuntu 預設 Repository 安裝的好處是簡單, 但缺點是安裝的版本會較舊。
 

$ sudo apt-get install nodejs
$ sudo apt-get install npm

 

PPA Repository 安裝:

如果想安裝較新的版本, 可以透過 PPA Repository 安裝。

先加入 PPA repository:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository -y -r ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs

 

Node.js 安裝 Script

使用 Node.js 提供的安裝 Script 安裝是很簡單的方法, 而且可以安裝到最新版本:

$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash –
$ sudo apt-get install nodejs

nodejs -v查看nodejs版本(10.14.2的版本 OK的)
 ubuntu16.04預裝版本V4太舊,npm start時會出現npm ERR!scratch-gui@0.1.0 start: `webpack-dev-server` npm ERR! Exit status 1 錯誤

 

安裝scratch 3.0  https://github.com/LLK/scratch-gui
 

If you want to edit/play yourself:

git clone https://github.com/LLK/scratch-gui.git
cd scratch-gui
npm install

Getting started

Running the project requires Node.js to be installed.

Running

Open a Command Prompt or Terminal in the repository and run:

npm start

Then go to http://localhost:8601/ – the playground outputs the default GUI component

本篇發表於 Linux系統。將永久鏈結加入書籤。