heroku RAILS 6构建失败

bvhaajcl  于 12个月前  发布在  其他
关注(0)|答案(1)|浏览(114)

我有这个问题后,在heroku建设后修复Babel问题,我仍然得到这个错误。

Done in 13.56s.
       autoprefixer: /tmp/build_0623a275/app/assets/stylesheets/application.scss:25571:3: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
       autoprefixer: /tmp/build_0623a275/app/assets/stylesheets/chat.scss:25570:3: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
       Compiling...
       Compilation failed:
       Error: error:0308010C:digital envelope routines::unsupported
           at new Hash (node:internal/crypto/hash:68:19)
           at Object.createHash (node:crypto:138:10)
           at CompressionPlugin.taskGenerator (/tmp/build_0623a275/node_modules/compression-webpack-plugin/dist/index.js:163:38)
           at taskGenerator.next (<anonymous>)
           at /tmp/build_0623a275/node_modules/compression-webpack-plugin/dist/index.js:216:49
           at CompressionPlugin.runTasks (/tmp/build_0623a275/node_modules/compression-webpack-plugin/dist/index.js:236:9)
           at /tmp/build_0623a275/node_modules/compression-webpack-plugin/dist/index.js:270:18
           at _next0 (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:37:17)
           at eval (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:53:1)
           at WebpackAssetsManifest.handleEmit (/tmp/build_0623a275/node_modules/webpack-assets-manifest/src/WebpackAssetsManifest.js:486:5)
           at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:49:1)
           at AsyncSeriesHook.lazyCompileHook (/tmp/build_0623a275/node_modules/tapable/lib/Hook.js:154:20)
           at Compiler.emitAssets (/tmp/build_0623a275/node_modules/webpack/lib/Compiler.js:491:19)
           at onCompiled (/tmp/build_0623a275/node_modules/webpack/lib/Compiler.js:278:9)
           at /tmp/build_0623a275/node_modules/webpack/lib/Compiler.js:681:15
           at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
           at AsyncSeriesHook.lazyCompileHook (/tmp/build_0623a275/node_modules/tapable/lib/Hook.js:154:20)
           at /tmp/build_0623a275/node_modules/webpack/lib/Compiler.js:678:31
           at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
           at AsyncSeriesHook.lazyCompileHook (/tmp/build_0623a275/node_modules/tapable/lib/Hook.js:154:20)
           at /tmp/build_0623a275/node_modules/webpack/lib/Compilation.js:1423:35
           at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
           at AsyncSeriesHook.lazyCompileHook (/tmp/build_0623a275/node_modules/tapable/lib/Hook.js:154:20)
           at /tmp/build_0623a275/node_modules/webpack/lib/Compilation.js:1414:32
           at eval (eval at create (/tmp/build_0623a275/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
           at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
       

 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

字符串
我正在寻找可能的解决方案,我使用Rails 6.1.3,Ruby 3.0.1,并使用yarn作为包管理器。

3qpi33ja

3qpi33ja1#

我只是有这个问题。
进入heroku中的应用设置,点击reveal config vars并添加以下内容:
关键字:NODE_OPTIONS
值:--openssl-legacy-provider
尝试在此更改后再次将应用推送到heroku。
对我有用,希望对你有用!

相关问题