Railsアプリを本番環境にデプロイする過程で以下のプリコンパイルを行いましたがエラーになってしまいます。
RAILS_ENV=production bundle exec rails assets:precompile
エラーメッセージ
ERROR in ./app/javascript/packs/application.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: Cannot read property '#<Object>' of undefined 〜以下略
package.json
{ "name": "Ulysses_01_app", "private": true, "dependencies": { "@popperjs/core": "^2.11.0", "@rails/actioncable": "^7.0.0", "@rails/actiontext": "^7.0.0", "@rails/ujs": "^7.0.0", "@rails/webpacker": "5.4.3", "bootstrap": "^5.1.3", "bootstrap-sass": "^3.4.1", "channels": "^0.0.4", "chart.js": "^3.7.0", "chartkick": "^4.1.1", "coffee-loader": "^3.0.0", "coffeescript": "2.6.1", "data-confirm-modal": "^1.6.2", "flatpickr": "^4.6.9", "highcharts": "^9.3.2", "import-glob-loader": "^1.1.0", "jquery": "^3.6.0", "jquery-migrate": "^3.3.2", "jquery-ui": "^1.13.0", "jquery-ui-dist": "^1.13.0", "moment": "^2.29.1", "popper.js": "^1.16.1", "rails-erb-loader": "^5.5.2", "rails-ujs": "^5.2.6", "raty-js": "^3.1.1", "tempusdominus-bootstrap-4": "^5.39.0", "trix": "^1.3.1" }, "devDependencies": { "webpack-dev-server": "^4.7.1" } }
何らかのVersionの相性の問題かとも思い、パッケージを全て最新にするなどやってみましたが問題が解消しません。アドバイスありましたら何卒よろしくお願いいたします
あなたの回答
tips
プレビュー