rails-erb-loader で起こるエラーを回避する方法

spring を無効にして webpack もしくは、webpack-dev-server を実行する

$ DISABLE_SPRING=1 bin/webpack-dev-server

参考:

Webpack dev server with rails-erb-loader and spring hangs · Issue #47 · usabilityhub/rails-erb-loader – GitHub

Error: rails-erb-loader failed with code: 1 · Issue #63 · usabilityhub/rails-erb-loader – GitHub

Rails erb loader Compile Error · Issue #1529 · rails/webpacker – GitHub

DISABLE_SPRING=1

options: {
  env: { ...process.env, DISABLE_SPRING: 1 }
}

参考:

Allow specifying environment variables for runner in options by PikachuEXE · Pull Request #70 · usabilityhub/rails-erb-loader – GitHub

Unable to supply environment variables in `runner` argument. · Issue #64 · usabilityhub/rails-erb-loader – GitHub

timeout オプション

options: {
  timeoutMs: 30000
}

参考:

Options – usabilityhub/rails-erb-loader: Embedded Ruby (.erb) webpack loader for Ruby projects – GitHub

Add timeout option by rhys-vdw · Pull Request #46 · usabilityhub/rails-erb-loader – GitHub

timeout option doesn’t always work · Issue #54 · usabilityhub/rails-erb-loader – GitHub

Use JS timeout instead of Ruby timeout by rhys-vdw · Pull Request #55 · usabilityhub/rails-erb-loader – GitHub

コメント内の ERB が評価される

参考:

erb tags in comment lines should be ignored · Issue #34 · usabilityhub/rails-erb-loader – GitHub

adding .erb will block bin/webpack-dev-server · Issue #338 · rails/webpacker – GitHub

rails-erb-loader failed with code: 1 · Issue #62 · usabilityhub/rails-erb-loader – GitHub

タグ:

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です