I have a problem with the 'frontity build' command.

Error: list.es5.363de77e68c217a63acf.js from Terser
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at D:\Chamba\proyecto\node_modules\terser-webpack-plugin\dist\index.js:217:37
at Array.forEach ()
at TerserPlugin.optimizeFn (D:\Chamba\proyecto\node_modules\terser-webpack-plugin\dist\index.js:160:259)
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :7:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1405:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1342:27)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compiler.js:675:18
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1261:4
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :24:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.finish (D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1253:28)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compiler.js:672:17
at eval (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :11:1)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1185:12
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1097:9
at processTicksAndRejections (node:internal/process/task_queues:77:11)

proyecto.es5.09a51f56cc7137b769fc.js from Terser
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at D:\Chamba\proyecto\node_modules\terser-webpack-plugin\dist\index.js:217:37
at Array.forEach ()
at TerserPlugin.optimizeFn (D:\Chamba\proyecto\node_modules\terser-webpack-plugin\dist\index.js:160:259)
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :7:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1409:36
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1405:32
at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (D:\Chamba\proyecto\node_modules\tapable\lib\Hook.js:154:20)
at Compilation.seal (D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1342:27)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compiler.js:675:18
at eval (eval at create (D:\Chamba\proyecto\node_modules\tapable\lib\HookCodeFactory.js:33:10), :11:1)
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1185:12
at D:\Chamba\proyecto\node_modules\webpack\lib\Compilation.js:1097:9
at processTicksAndRejections (node:internal/process/task_queues:77:11)

I’ve the same error in all my websites. Downgrade Node doesn’t work.

Hello there!

Downgrading node will work, you just have to make sure you go down to the right version (16 or below).

You can also add the --development flag to the build process, this will disable optimizations though and I wouldn’t recommend it.

Lastly you can make sure your node env allows for legacy openSSL.

Read my answer over at Digital envelope routines:unsupported - #4 by frederik.nordahl

Clearly these are only temp fixes to a permanent problem. We need to update the underlying outdated webpack in frontity at some point (I believe it’s babel which is including it)

/Frederik