質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

React.js

Reactは、アプリケーションのインターフェースを構築するためのオープンソースJavaScriptライブラリです。

Q&A

0回答

256閲覧

Webpacker x React x Rails で ERROR in Entry module not found

TOMTAM

総合スコア10

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

React.js

Reactは、アプリケーションのインターフェースを構築するためのオープンソースJavaScriptライブラリです。

0グッド

0クリップ

投稿2018/09/20 11:19

今回のプロジェクトは初のReact & Railsのプロジェクトで
これまでできていたEC2へのデプロイ時にこのような問題が起きてしまいます。
development環境では全く問題がないのですが、test or production の場合 にmoduleが見つからないという問題が起きてしまいます。

file-loaderは入っているため何が問題かわからないのですが、どこを見るべきかなどでもいいので教えていただければ。
他に必要な情報があれば教えていただければ幸いです。

** [out :: drfellow-test-app1] ERROR in Entry module not found: Error: Can't resolve 'file-loader' in

# Note: You must restart bin/webpack-dev-server for changes to take effect default: &default source_path: app/javascript source_entry_path: packs public_output_path: packs cache_path: tmp/cache/webpacker loader: file-loader # Additional paths webpack should lookup modules # ['app/assets', 'engine/foo/app/assets'] resolved_paths: [] # Reload manifest.json on all requests so we reload latest compiled packs cache_manifest: false extensions: - .jsx - .js - .sass - .scss - .css - .module.sass - .module.scss - .module.css - .png - .svg - .gif - .jpeg - .jpg development: <<: *default compile: true # Reference: https://webpack.js.org/configuration/dev-server/ dev_server: https: false host: localhost port: 3035 public: localhost:3035 hmr: false # Inline should be set to true if using HMR inline: true overlay: true compress: true disable_host_check: true use_local_ip: false quiet: false headers: 'Access-Control-Allow-Origin': '*' watch_options: ignored: /node_modules/ test: <<: *default compile: true # Compile test packs to a separate directory public_output_path: packs-test develop: <<: *default # Production depends on precompilation of packs prior to booting for performance. compile: false # Cache manifest.json for performance cache_manifest: true production: <<: *default # Production depends on precompilation of packs prior to booting for performance. compile: false # Cache manifest.json for performance cache_manifest: true
package.json { "name": "drfellow", "private": true, "dependencies": { "@rails/webpacker": "3.5", "ajv": "^6.5.3", "babel-preset-react": "^6.24.1", "babel-runtime": "^6.26.0", "final-form": "^4.10.0", "lodash": "^4.17.10", "prop-types": "^15.6.2", "react": "^16.4.2", "react-dom": "^16.4.2", "react-final-form": "^3.6.5", "react-ga": "^2.5.3", "react-redux": "^5.0.7", "react-router-dom": "^4.3.1", "react-scripts": "1.1.4", "react-select": "^2.0.0", "react-spinners": "^0.3.3", "redux": "^4.0.0", "redux-persist": "^5.10.0", "redux-thunk": "^2.3.0", "webpack": "3.12.0" }, "devDependencies": { "babel-cli": "^6.26.0", "babel-loader": "^7.1.5", "babel-plugin-transform-runtime": "^6.23.0", "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.7.0", "file-loader": "^2.0.0", "url-loader": "1.0.1", "webpack-dev-server": "2.11.2" } }

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問