前提・実現したいこと
個人アプリをherokuにデプロイしたいのですがエラーの連続で困っています。
発生している問題・エラーメッセージ
remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: NODE_VERBOSE=false remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: remote: Resolving node version 10.x... remote: Downloading and installing node 10.15.3... remote: Using default npm version: 6.4.1 remote: remote: -----> Installing dependencies remote: Installing node modules (package.json) remote: up to date in 0.471s remote: found 0 vulnerabilities remote: remote: remote: -----> Build remote: remote: -----> Caching build remote: - node_modules (nothing to cache) remote: remote: -----> Pruning devDependencies remote: up to date in 0.817s remote: found 0 vulnerabilities remote: remote: remote: -----> Build succeeded! remote: ! This app may not specify any way to start a node process remote: https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.1 remote: -----> Installing dependencies using bundler 2.0.1 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. remote: Bundle complete! 31 Gemfile dependencies, 80 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: remote: Post-install message from sass: remote: remote: Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. remote: remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new remote: primary implementation: https://sass-lang.com/install remote: remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the remote: sassc gem: https://github.com/sass/sassc-ruby#readme remote: remote: * For more details, please refer to the Sass blog: remote: http://sass.logdown.com/posts/7081811 remote: remote: Bundle completed (161.71s) remote: Cleaning up the bundler cache. remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install remote: I, [2019-04-09T02:14:37.699486 #2182] INFO -- : Writing /tmp/build_032af671386c09757d312fd8efcf3f9d/public/assets/sports-cf01462e39c2b055a2f0155046623feee8fe10f77533e326d0963172bd8990c2.jpg remote: I, [2019-04-09T02:14:37.702659 #2182] INFO -- : Writing /tmp/build_032af671386c09757d312fd8efcf3f9d/public/assets/user-bd3f6b03b910e58c6dce0a6329c3c22b842431722c12802803f855a5c39cb47f.png remote: rake aborted! remote: Uglifier::Error: Unexpected character '`' remote: Tasks: TOP => assets:precompile remote: (See full trace by running task with --trace) remote: remote: ! **remote: ! Precompiling assets failed.** remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote:
試したこと
rake abortedの下にUglifierエラーがあったのでproduction.rbのUglifierの箇所をコメントアウトしました。
また、heroku buildpacks:add --index 1 heroku/nodejs
このコマンドを打った後にgit push heroku masterしてもエラーは解消されなかったです。
一応Precompiling assets failed.でググって出てきた解消法を全て試しましたがダメでした。どなたか助けていただけませんか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。