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

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

新規登録して質問してみよう
ただいま回答率
85.49%
ECMAScript

ECMAScriptとは、JavaScript類の標準を定めるために作られたスクリプト言語です。

Ruby on Rails 5

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

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

React.js

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

Q&A

1回答

1000閲覧

EntryModuleNotFoundError: Entry module not found: Error: Can't resolve 'eslint-loader' in '/tmp/buil

s.k

総合スコア423

ECMAScript

ECMAScriptとは、JavaScript類の標準を定めるために作られたスクリプト言語です。

Ruby on Rails 5

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

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

React.js

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

0グッド

0クリップ

投稿2019/06/20 09:07

編集2019/06/20 09:10

前提・実現したいこと

  • herokuにデプロイしたいです。
  • buildに失敗してしまいます。
  • eslint-loader はローカルで正常にインストールできています。

発生している問題・エラーメッセージ

-----> Installing node-v10.14.1-linux-x64 -----> Installing yarn-v1.12.3 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile yarn install v1.12.3 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.9: The platform "linux" is incompatible with this module. info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @babel/preset-react@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0". warning "@babel/preset-react > @babel/plugin-transform-react-display-name@7.2.0" has unmet peer dependency Compiling… Compilation failed: EntryModuleNotFoundError: Entry module not found: Error: Can't resolve 'eslint-loader' in '/tmp/build_1ff7480291fe82d9b913577f072271a1' at moduleFactory.create at _fn0 (eval at create (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at hook.callAsync (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1) at resolver.doResolve (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38) at hook.callAsync (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn1 (eval at create (/tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1) resolve 'eslint-loader' in '/tmp/build_1ff7480291fe82d9b913577f072271a1' Parsed request is a module using description file: /tmp/build_1ff7480291fe82d9b913577f072271a1/package.json (relative path: .) resolve as module /tmp/node_modules doesn't exist or is not a directory /node_modules doesn't exist or is not a directory looking for modules in /tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules using description file: /tmp/build_1ff7480291fe82d9b913577f072271a1/package.json (relative path: ./node_modules) using description file: /tmp/build_1ff7480291fe82d9b913577f072271a1/package.json (relative path: ./node_modules/eslint-loader) no extension /tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/eslint-loader doesn't exist .js /tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/eslint-loader.js doesn't exist .json /tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/eslint-loader.json doesn't exist as directory /tmp/build_1ff7480291fe82d9b913577f072271a1/node_modules/eslint-loader doesn't exist ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed

該当のソースコード

package.json

json

1{ 2 "name": "code-review", 3 "private": true, 4 "dependencies": { 5 "@babel/preset-react": "^7.0.0", 6 "@rails/webpacker": "^4.0.7", 7 "babel-plugin-transform-react-remove-prop-types": "^0.4.24", 8 "bootstrap": "4.3.1", 9 "jquery": "^3.4.1", 10 "popper.js": "^1.15.0", 11 "postcss-loader": "^3.0.0", 12 "prop-types": "^15.7.2", 13 "rails-ujs": "^5.2.3", 14 "react": "^16.8.6", 15 "react-dom": "^16.8.6", 16 "sass-loader": "^7.1.0", 17 "turbolinks": "^5.2.0" 18 }, 19 "devDependencies": { 20 "eslint": "^5.16.0", 21 "eslint-config-standard": "^12.0.0", 22 "eslint-config-standard-react": "^7.0.2", 23 "eslint-loader": "^2.1.2", 24 "eslint-plugin-import": "^2.17.3", 25 "eslint-plugin-node": "^9.1.0", 26 "eslint-plugin-promise": "^4.1.1", 27 "eslint-plugin-react": "^7.13.0", 28 "eslint-plugin-standard": "^4.0.0", 29 "webpack-dev-server": "^3.7.1" 30 }, 31 "scripts": { 32 "lint": "yarn run eslint --ext .react --ext .js app/javascript" 33 } 34}

試したこと

  • キャッシュが原因かと思ったので以下のコマンドを試しました。
heroku plugins:install heroku-repo heroku repo:purge_cache -a appname

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

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

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

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

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

guest

回答1

0

https://relativelayout.hatenablog.com/entry/2018/11/08/092143
nodeのversionを指定するとどうでしょうか?

投稿2019/06/20 09:12

t_kusakabe74

総合スコア549

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

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

s.k

2019/06/20 09:28 編集

ありがとうございます。うーん、バージョンは指定したのですがエラーログに変化は無い様に見えます。。。 "private": true, "engines": { "node": "10.14.1", "npm": "6.4.1" }, "dependencies": {
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

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

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

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

ただいまの回答率
85.49%

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

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

質問する

関連した質問