LoginSignup
1
1

More than 5 years have passed since last update.

redashビルドとエラー対応(2017/11 時点)

Last updated at Posted at 2017-11-01

Redashのリビルド

Ubuntu16にbootstrap.shで直インストールしたredashをちょっと手直ししたく、ソースをいじってみましたが、
nodeとかwebpackとかよく知らないですが、buildしないと反映されないんですね。
無知すぎていろいろ手こずったのでメモを残します。

npm周りをインストールし、nodeバージョンを指定

nodeのバージョンが新しすぎても古くても問題が発生したので、npmバージョン管理ツールのnvmを使って指定しておきます。

$ apt install npm
$ git clone git://github.com/creationix/nvm.git ~/.nvm
$ source ~/.nvm/nvm.sh
$ nvm install v8.9.0

npm install、npm run build

本来は/opt/redash/redash.x.xxx/でinstallとrun buildすれば動作するはずなんですが、
現時点ではnpm run buildの時点でエラーを吐きます。
同じ問題にぶち当たってる人はそこそこいる様子?

500 error post setup on docker install
https://github.com/getredash/redash/issues/1578#issuecomment-326128982

ERROR in ./client/app/index.js
Module build failed: TypeError: Cannot read property 'length' of undefined
    at Traverser.traverse (/opt/redash/redash.2.0.1.b3080/node_modules/estraverse/estraverse.js:411:37)
    at Traverser.traverse (/opt/redash/redash.2.0.1.b3080/node_modules/eslint/lib/util/traverser.js:31:22)
    at EventEmitter.module.exports.api.verify (/opt/redash/redash.2.0.1.b3080/node_modules/eslint/lib/eslint.js:926:23)
    at processText (/opt/redash/redash.2.0.1.b3080/node_modules/eslint/lib/cli-engine.js:264:31)
    at CLIEngine.executeOnText (/opt/redash/redash.2.0.1.b3080/node_modules/eslint/lib/cli-engine.js:754:26)
    at lint (/opt/redash/redash.2.0.1.b3080/node_modules/eslint-loader/index.js:218:17)
    at Object.module.exports (/opt/redash/redash.2.0.1.b3080/node_modules/eslint-loader/index.js:213:21)

エラーの内容を見るに3つほどのモジュールでobjectタイプを判別できていないのだろうか。

場当たり対処

/opt/redash/redash.x.xxx/でエラー対象のモジュールを再インストールすると…npm run buildが通りました。

$ npm install estraverse
$ npm install eslint
$ npm install eslint-loader
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1