前提・実現したいこと
- 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
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/20 09:28 編集