Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9356

toio準備

$
0
0

1) Node.js
nodist 0.9.1 //nodist は Node.js のバージョンを管理するツール。
npm -v 6.9.0

2) nobleインストール
nobleはNode.jsでBluetooth LEを扱うためのモジュールです。toioはnobleを使います。

a) Windows10にnobleをインストールする https://qiita.com/s_nkg/items/3f27328e108d7fa8d076
b) [Windowsでnpm installしてnode-gypでつまずいた時対処方法] https://qiita.com/AkihiroTakamura/items/25ba516f8ec624e66ee7


次のエラーがでるので"npm install -g node-gyp"をしておく
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build t ools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 bui ld tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-cli ck the solution, and then selecting "Retarget solution".

☆ python27の場所も教え解く
npm config set python C:\Python27\python.exe

☆ npm install noble 再実行するとOK

注意点:
・VS2015はV140、VS2017=V141です。
・Powershellを開発者モードで開く
・python27を指定しているか(pathではなくnpmコマンドで指定する)

VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140

3) bluetooth ドライバ更新
デスクトップだとBlueToohドングルをつける必要あるので、準備してください。
image.png


Viewing all articles
Browse latest Browse all 9356

Trending Articles