はじめてのNode.jsインストール(2019年3月2日更新)
- 作者: 掌田津耶乃
- 出版社/メーカー: 秀和システム
- 発売日: 2018/08/25
- メディア: 単行本
- この商品を含むブログを見る
環境情報
OS
OS | バージョン | 備考 |
---|---|---|
macOS Mojava | 10.14.2 | ホストOS |
Oracle VM VirtualBox | 5.2.24 | |
Ubuntu | 18.04.1LTS | ゲストOS |
Node.js
Node.js | バージョン | 備考 |
---|---|---|
npm | 6.4.1 | |
node | v8.15.0 |
環境構築
▼環境構築の仕方はこちらなどをご参考に。
はじめてのCounterpartyノード構築Part1(2018年9月29日更新) - kharukaのブログ~お金と技術とキャリア~
Node.jsのインストール
作業用ディレクトリ作成
mkdir work cd work
apt update と upgrade
sudo apt update sudo apt upgrade -y
ライブラリのインストール
sudo apt install -y build-essential
nodejs と npm のインストール
sudo apt install -y curl curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt install -y nodejs
バージョン確認
node -v -- v10.15.0 -- npm -v -- 6.4.1 --
package.json作成
取り敢えず、全てenter
でOK。
$ npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults. See `npm help json` for definitive documentation on these fields and exactly what they do. Use `npm install <pkg>` afterwards to install a package and save it as a dependency in the package.json file. Press ^C at any time to quit. package name: (tmp) version: (1.0.0) description: entry point: (index.js) test command: git repository: keywords: author: license: (ISC) About to write to ~/tmp/package.json: { "name": "tmp", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }
bitcoinjs-lib のインストール
npm install bitcoinjs-lib --save
参考
- 作者: アンドレアス・M・アントノプロス
- 出版社/メーカー: NTT出版
- 発売日: 2017/06/01
- メディア: Kindle版
- この商品を含むブログを見る