an image of a forest and water

Notes on Amber - Part 1

I've been trying to push the limits for versioning in terms of using the Amber framework with Crystal 1.2.0. I may be a glutton for Dependency Hell punishment but I'm inching my way forward with a test project.

I've gotten a skeleton up by generating a new project and running amber watch

Crystal version - 1.2.0
Node version - 17.0.1
NPM version - 8.1.0

For package.json, I had to make a couple of small changes:

"node-sass": "^6.0.1" 
"sass-loader": "^12.2.0" 
"webpack": "^5.59.1" 

This produced the following error:

'error:03000086:digital envelope routines::initialization error' 

After a little bit of looking, it looks like older versions of webpack - specifically the version used in the default package.json in a new Amber project, webpack relies on a hashing method that is not available in newer ssl implementations. You have to modify your webpack configs to declare hashFunction and set it like so (below is from my development config):

module.exports = merge(common, { 
  mode: 'development', 
  devtool: 'inline-source-map', 
  output: { 
  hashFunction: "xxhash64" 
  } 
});

This article was updated on 25 Oct 2021

Comments