nodeのバージョン縛りを緩めてみるね。
$ git diff master package.json
diff --git a/package.json b/package.json
index 178c18d0e..354fae027 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "@tootsuite/mastodon",
"license": "AGPL-3.0-or-later",
"engines": {
- "node": ">=10.13"
+ "node": "12.x"
},
"scripts": {
"postversion": "git push --tags",
$ git revert 1c3b5e7c24
Auto-merging package.json
[use-ruby270-take2 05ec55896] Revert "Pin node to 12.x"
1 file changed, 1 insertion(+), 1 deletion(-)
-----> Node.js app detected
:
Downloading and installing node 14.5.0...
:
-----> Installing dependencies
Installing node modules (yarn.lock)
yarn install v1.22.4
:
-----> Ruby app detected
:
yarn install v1.22.4
:
Ruby buildpack側のnodeのバージョンはわからないわね。
Pumaは期待どおり起動する。One-offで
$ heroku run bash
~ $ node --version
v14.5.0
~ $ BIND=0.0.0.0 node ./streaming
/app/node_modules/@clusterws/cws/dist/shared.js:18
throw err;
^
Error: Cannot find module '../dist/bindings/cws_linux_83'
ほう。
~ $ ls node_modules/\@clusterws/cws/dist/bindings/
cws_darwin_64.node cws_darwin_79.node cws_linux_72.node cws_win32_64.node cws_win32_79.node
cws_darwin_72.node cws_linux_64.node cws_linux_79.node cws_win32_72.node
Ruby buildpackのyarn installだけ12.xを使ってるのかな?
$ heroku buildpacks
=== zundan-mastodon-ruby270 Buildpack URLs
1. https://github.com/gaffneyc/heroku-buildpack-jemalloc.git
2. https://github.com/heroku/heroku-buildpack-apt
3. heroku/nodejs
4. heroku/ruby
$ heroku buildpacks:remove heroku/nodejs
うりゃ
:
-----> Ruby app detected
:
-----> Installing node-v12.16.2-linux-x64
:
お
$ heroku run bash
~ $ node --version
v12.16.2
~ $ BIND=0.0.0.0 node ./streaming
info Starting streaming API server master with 1 workers
info Starting worker 1
info Worker 1 now listening on 0.0.0.0:39260
ふむ
heroku-buildpack-rubyが走らせるyarn installではnode 12.16.2が使われるんだけど稼動時にはheroku-buildpack-nodeがインストールするnode 14.5.0が使われるんだね。heroku-buildpack-nodeをはずすのがとりあえずの解決方法のようだ。