前提・実現したいこと
Railsでwebサービスの開発を行っています。
git push herokuをすると、以下のようなエラーが出ます。
remote: Compiling… remote: Compilation failed: remote: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. remote: - configuration has an unknown property 'optimization'. These properties are valid: remote: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? } remote: For typos: please correct them. remote: For loader options: webpack 2 no longer allows custom properties in configuration. remote: Loaders should be updated to allow passing options via loader options in module.rules. remote: Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader: remote: plugins: [ remote: new webpack.LoaderOptionsPlugin({ remote: // test: /.xxx$/, // may apply this only for some modules remote: options: { remote: optimization: ... remote: } remote: }) remote: ] remote: - configuration.module.rules[1] has an unknown property 'sideEffects'. These properties are valid: remote: object { enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resource?, resourceQuery?, compiler?, rules?, test?, use? } remote: - configuration.module.rules[2] has an unknown property 'sideEffects'. These properties are valid: remote: object { enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resource?, resourceQuery?, compiler?, rules?, test?, use? } remote: - configuration.module.rules[3] has an unknown property 'sideEffects'. These properties are valid: remote: object { enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resource?, resourceQuery?, compiler?, rules?, test?, use? } remote: - configuration.module.rules[4] has an unknown property 'sideEffects'. These properties are valid: remote: object { enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resource?, resourceQuery?, compiler?, rules?, test?, use? }
エラーコードを読むとoptimization
というプロパティがinvalidであるようなのですが、そもそもこのコードはどのファイルのものなのかが分かりません。。。
テキストエディタで検索もかけてみたのですが、ヒットせず、対処方法がわかりません。
程度の低い質問でしたら申し訳ございません。
また、質問に必要な情報等に不足があれば、お手数ですがご指摘いただければ、追記いたします。
よろしくお願いいたします。
補足情報(FW/ツールのバージョンなど)
Rails 6.0.3
Ruby 2.6.7
あなたの回答
tips
プレビュー