2019/11/21

electron v7 以降は Raspberry Pi にデフォルトでインストールできない

Raspberry Pi で electron をインストールしようとすると以下のように落ちてしまいました。

```
> electron@7.1.2 postinstall /home/pi/test/node_modules/electron
> node install.js

(node:5861) UnhandledPromiseRejectionWarning: HTTPError: Response code 404 (Not Found)
    at EventEmitter. (/home/pi/test/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (events.js:210:5)
    at module.exports (/home/pi/test/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (/home/pi/test/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (events.js:300:26)
    at ClientRequest.emit (events.js:215:7)
    at ClientRequest.origin.emit (/home/pi/test/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:17)
    at TLSSocket.socketOnData (_http_client.js:456:22)
(node:5861) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5861) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/test/package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.

+ electron@7.1.2
added 87 packages from 91 contributors and audited 104 packages in 22.813s
found 0 vulnerabilities
```

2013/11/26

Raspberry Pi に の pulse-audio で音がブツブツ切れるので USB DAC (LXU-OT2) をつないでみた

我が家の Raspberry Pi に pulse-audio を入れてみました。

pulse-audio のインストール
$ sudo apt-get install pulseaudio pulseaudio-module-zeroconf 

pulse-audio で再生。
$ paplay /usr/share/sounds/alsa/Rear_Right.wav
すると、音がブツブツ途切れるではありませんか。
全く使い物になりません。

ALSA で再生してみる。
$ aplay /usr/share/sounds/alsa/Rear_Right.wav
こちらは、ちゃんと再生されます。

pulse-audio のバージョンとかいろいろ考えたのですが、とりあえず別の DAC で試してみるのはどうかと思いつきました。
というのも、先日買った Stereo (2013年1月号) という雑誌に USB-DAC (LXU-OT2) が付録でついていて、活用できていなかったので付録につられて買っただけです。オーディオマニアではありません。

Raspberry Pi の上に重ねてみると、調度良い大きさ。

早速、USB で接続してみました。
USB-DAC を使用する方法はいろいろありますが、今回は使い物にならないデフォルトの音声出力を切ってしまうことにしました。
以下のように、1行コメントアウトするだけです。

/etc/modules
#snd-bcm2835

USB-DAC を使って pulse-audio で再生してみると、音が途切れること無く再生されました。
検索しても同じような症状を見つけられなかったので、私の Raspberry Pi のハード的な欠陥なのかもしれません。

ちなみに、 Stereo (2013年1月号) は月刊誌なので今では手に入りにくいようですただ、今調べたところ、10000円くらいで売りに出てるサイトもありました。再販したんでしょうか?
ちなみに、最初のお値段は 2800円でした。


以下なんかが代替商品になるかもしれません。

上海道場【初段】 超小型 手のひらサイズ USB DAC (D/Aコンバーター DAコンバーター) Donyaダイレクト DN-USBDAC ZY [メ04] |【上海問屋】通販サイト

購入していないのでなんとも言えませんが…
購入したらレビューしたいと思います。