我试图将Rails 6应用程序部署到Heroku,并遇到以下错误:
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Unknown Syntax Error: Unsupported option name ("--no-progress").
remote:
remote: $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed通过谷歌搜索,我认为这可能与纱线有关。有人有什么想法吗?
发布于 2022-01-23 16:54:54
我安装了纱版本3.1.1。当我试图预编译Rails 5.2应用程序的生产资产时,我在终端中得到了这个错误。我将纱线版本降至1.22.17,并成功地预编译了我的资产,没有出现错误。
以下是终端命令和消息。
[railsappfolder] (master) rake assets:precompile RAILS_ENV=production
Unknown Syntax Error: Unsupported option name ("--no-progress").
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
[railsappfolder] (master) yarn set version 1.22.17
➤ YN0000: Retrieving https://github.com/yarnpkg/yarn/releases/download/v1.22.17/yarn-1.22.17.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-1.22.17.cjs
➤ YN0000: Done in 1s 665ms
[railsappfolder] (master) rake assets:precompile RAILS_ENV=production
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
✨ Done in 0.05s.https://stackoverflow.com/questions/70513481
复制相似问题