ChainSafe / ssz

Typescript implementation of Simple Serialize (SSZ)
https://simpleserialize.com/
Other
50 stars 19 forks source link

fix: add hasher alias to webpack config to fix build #325

Closed nflaig closed 1 year ago

nflaig commented 1 year ago

Motivation

Closes https://github.com/ChainSafe/ssz/issues/324

Description

Add alias to webpack config to fix build.

@g11tech I noticed you added this in https://github.com/ChainSafe/ssz/pull/318 but it got removed by a force-push.

nflaig commented 1 year ago

looks like this fixes it locally for me but breaks it in CI, must be missing something else

nflaig commented 1 year ago

@g11tech yeah, looking at https://github.com/ethereumjs/ethereumjs-monorepo/pull/2656, seems to be working fine by removing aliases. The build only fails for me locally, CI works as expected. Are you able to build locally? I must be missing something

g11tech commented 1 year ago

i have figured out what is happening, old cached node modules of previous versions are still interfering

  1. Remove all node_modules ( main repo root node_modules as well as inside packages/*/node_modules If you had old code, their previous builds are cached there and are interfering)
  2. corepack enable if you haven't been running it to enable yarn workspace functionality

then

  1. yarn --immutable for installing packages
  2. yarn build

then the build is successful