前提・実現したいこと
herokuにデプロイした際
To https://git.heroku.com/アプリ名.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/アプリ名.git'
と出ておりデプロイできない状況。
発生している問題・エラーメッセージ
heroku logをし見てみるとhttps://dashboard.heroku.com/apps/9b40da25-2b33-4fe1-b369-780c23420d29/activity/builds/b8bf9448-9b97-47c7-969b-701b6caea2a2
このようなURLがでてきたのでエラー文を確認してみてた。
resolve '../map' in '/tmp/build_6707636b/app/javascript/packs' using description file: /tmp/build_6707636b/package.json (relative path: ./app/javascript/packs) Field 'browser' doesn't contain a valid alias configuration using description file: /tmp/build_6707636b/package.json (relative path: ./app/javascript/map) no extension Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map doesn't exist .mjs Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.mjs doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.js doesn't exist .sass Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.sass doesn't exist .scss Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.scss doesn't exist .css Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.css doesn't exist .module.sass Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.module.sass doesn't exist .module.scss Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.module.scss doesn't exist .module.css Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.module.css doesn't exist .png Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.png doesn't exist .svg Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.svg doesn't exist .gif Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.gif doesn't exist .jpeg Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.jpeg doesn't exist .jpg Field 'browser' doesn't contain a valid alias configuration /tmp/build_6707636b/app/javascript/map.jpg doesn't exist as directory /tmp/build_6707636b/app/javascript/map doesn't exist ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed
該当のソースコード
app/javascript/pacsがエラーが出ていると思い。どこがエラーか探してみたがわからない。。。
// This file is automatically compiled by Webpack, along with any other files // present in this directory. You're encouraged to place your actual application logic in // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") //= require jquery3 //= require popper //= require bootstrap-sprockets // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. // // const images = require.context('../images', true) // const imagePath = (name) => images(name, true) import 'bootstrap'; import '../stylesheets/application';
試したこと
app/javascript/pacs/application.js
のなかにrequire("../map")を入れていたがそれを削除して他に入っていた不要な.js
も削除しましたがエラー文が同じで解決策が分かりません。
補足情報(FW/ツールのバージョンなど)
どなたか助けてください????????????♂️
![guest](/img/icon/icnUserSample.jpg)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。