Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http://localhost:3000/packs/js/application-ad5785fe174683ac446c.js net::ERR_ABORTED 404 (Not Found)を解決させたい #101

Closed
subaru-hello opened this issue Dec 15, 2021 · 3 comments

Comments

@subaru-hello
Copy link
Owner

概要

herokuにデプロイ後、ローカル環境が真っ白のまま動かなくなってしまいました。

実現したいこと

下記画像にある、net::ERR_ABORTED 404 (Not Found)を解消させたい。
Image from Gyazo

試したこと

./publicを削除すると画面が下記のように変わる

public/manifest.jsonの内容を削除した際に下記エラーが表示されたことから、manifest.jsonに原因があると考えた。
Image from Gyazo
manifest.json

  "application.js": "/packs/js/application-ad5785fe174683ac446c.js",
  "application.js.map": "/packs/js/application-ad5785fe174683ac446c.js.map",
  "entrypoints": {
    "application": {
      "js": [
        "/packs/js/application-ad5785fe174683ac446c.js"
      ],
      "js.map": [
        "/packs/js/application-ad5785fe174683ac446c.js.map"
      ]
    },
    "hello_vue": {
      "js": [
        "/packs/js/hello_vue-54070b2b2e75ce0eb772.js"
      ],
      "js.map": [
        "/packs/js/hello_vue-54070b2b2e75ce0eb772.js.map"
      ]
    }
  },
  "hello_vue.js": "/packs/js/hello_vue-54070b2b2e75ce0eb772.js",
  "hello_vue.js.map": "/packs/js/hello_vue-54070b2b2e75ce0eb772.js.map",
  "media/fonts/materialdesignicons-webfont.eot?v=6.3.95": "/packs/media/fonts/materialdesignicons-webfont-837327a8.eot",
  "media/fonts/materialdesignicons-webfont.ttf?v=6.3.95": "/packs/media/fonts/materialdesignicons-webfont-ac8d50b6.ttf",
  "media/fonts/materialdesignicons-webfont.woff2?v=6.3.95": "/packs/media/fonts/materialdesignicons-webfont-936ae473.woff2",
  "media/fonts/materialdesignicons-webfont.woff?v=6.3.95": "/packs/media/fonts/materialdesignicons-webfont-ccfe5ae5.woff",
  "media/src/img/Izakaya_4.jpeg": "/packs/media/src/img/Izakaya_4-c84e3eac6539ba0878e59b375a3cc59d.jpeg",
  "media/src/img/beer.jpeg": "/packs/media/src/img/beer-147613885aaf2ff2fe437458184173db.jpeg",
  "media/src/img/beer.svg": "/packs/media/src/img/beer-d2a7f1ea4582a787ecadb35ec4441046.svg",
  "media/src/img/certificate.png": "/packs/media/src/img/certificate-1d284cb668ad2fcae46287e31abffcde.png",
  "media/src/img/date.png": "/packs/media/src/img/date-e71ebcd2d3c002d2ed12dae48cec9378.png",
  "media/src/img/default_profile.png": "/packs/media/src/img/default_profile-c17d58945226facbde91954efa5c8285.png",
  "media/src/img/drink.svg": "/packs/media/src/img/drink-a7c0eb0fb64186678c67a3ca6ea80911.svg",
  "media/src/img/flesh_stamp.png": "/packs/media/src/img/flesh_stamp-4cce094c9e4f75d24336f703f02bf2e0.png",
  "media/src/img/high_ball_kanpai.jpg": "/packs/media/src/img/high_ball_kanpai-1f59cc25659fdc9d7ffa5458c09ff4fe.jpg",
  "media/src/img/ippai_shuki.png": "/packs/media/src/img/ippai_shuki-f6ddf080cdfe82716bf0f25dca3cc0ba.png",
  "media/src/img/line.png": "/packs/media/src/img/line-99ebb67660a5abe864ef2fcff5a5e323.png",
  "media/src/img/meitei_stamp.png": "/packs/media/src/img/meitei_stamp-938715e15f1da1e41c193f21ab12d840.png",
  "media/src/img/nomikai.png": "/packs/media/src/img/nomikai-924bb12f7fea27ed761766224bc7d9a4.png",
  "media/src/img/sake.svg": "/packs/media/src/img/sake-d4016fd25582d9b05bc5837b53aad52c.svg",
  "media/src/img/sugumeitei_stamp.png": "/packs/media/src/img/sugumeitei_stamp-b1e95246a2160bccd3cf845b77a8acef.png",
  "media/src/img/sugusake_stamp.png": "/packs/media/src/img/sugusake_stamp-588ffc8d629509cc574fd6135d9bbeb1.png",
  "media/src/img/tipsy_stamp.png": "/packs/media/src/img/tipsy_stamp-d2921108c83bb20d56d00abf43a87b7b.png"
}

現状できていること

@subaru-hello
Copy link
Owner Author

  • public配下の画像を削除
  • webpacker.ymlの記述を一部コメントアウト
  • devDependenciesにあるwebpack-dev-serverをDependenciesに移動
{
  "name": "zeroken",
  "private": true,
  "dependencies": {
    "@bit/joshk.vue-spinners-css.facebook-loader": "^1.1.5",
    "@fortawesome/fontawesome-free": "^5.15.4",
    "@fortawesome/fontawesome-svg-core": "^1.2.36",
    "@fortawesome/vue-fontawesome": "^2.0.2",
    "@mdi/font": "^6.2.95",
    "@prettier/plugin-ruby": "^2.0.0-rc3",
    "@rails/actioncable": "^6.0.0",
    "@rails/ujs": "^6.0.0",
    "@rails/webpacker": "5.4.3",
    "acorn": "6.4.2",
    "axios": "^0.23.0",
    "css-loader": "^4",
    "dayjs": "^1.10.7",
    "eslint": "^8.0.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-prettier": "^4.0.0",
    "eslint-plugin-vue": "^7.19.1",
    "jimp": "^0.16.1",
    "material-design-icons-iconfont": "^6.1.0",
    "prettier": "^2.4.1",
    "rails-ujs": "^5.2.6",
    "vee-validate": "^3.4.13",
    "vue": "^2.6.14",
    "vue-i18n": "^8.26.7",
    "vue-loader": "^15.9.8",
    "vue-router": "^3.5.2",
    "vue-scrollto": "^2.20.0",
    "vue-star-rating": "^1.7.0",
    "vue-style-loader": "^4.1.3",
    "vue-template-compiler": "^2.6.14",
    "vuetify": "^2.5.9",
    "vuex": "^3.6.2",
    "webpack": "^4.46.0",
    "webpack-cli": "^3.3.12",
    "webpack-dev-server": "^3"
  },
  "version": "0.1.0",
  "devDependencies": {
    "deepmerge": "^4.2.2",
    "sass": "^1.43.2",
    "sass-loader": "7.3.1"
  },
  "scripts": {
    "fmt": "prettier --write app/**/**/*.{js,rb,vue} app/**/*.{js,rb,vue} app/**/**/**/*.{js,rb,vue}"
  }
}
# Note: You must restart bin/webpack-dev-server for changes to take effect

default: &default
  source_path: app/frontend
  source_entry_path: packs
  # public_root_path: public
  # public_output_path: packs
  cache_path: tmp/cache/webpacker

@subaru-hello
Copy link
Owner Author

全く同じissueがありました。
rails/webpacker#2071

@subaru-hello
Copy link
Owner Author

public配下の画像数を減らしたら治りました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant