Troubleshooting
Build errors
If you receive errors that a module does not have some types or members exported during build, similar to one below:
src/ValidationService.ts(3,21): error TS2305: Module '"../../../node_modules/@ethereum-sourcify/core/build"' has no exported member 'SourceMap'.
src/ValidationService.ts(3,32): error TS2305: Module '"../../../node_modules/@ethereum-sourcify/core/build"' has no exported member 'PathBuffer'.
src/ValidationService.ts(3,44): error TS2305: Module '"../../../node_modules/@ethereum-sourcify/core/build"' has no exported member 'PathContent'.
src/ValidationService.ts(3,57): error TS2305: Module '"../../../node_modules/@ethereum-sourcify/core/build"' has no exported member 'CheckedContract'.
It is likely the symlinks between packages are broken. npm is trying to download and run the packages as external packages. Symlink the packages with lerna using:
npx lerna bootstrap
Error "o.filter is not a function" or "invalid chainIds"
This happens when you add a new chain or move to a new branch with a new chain, but the build files don't contain the newly added chain. You should
npx lerna bootsrap
npx lerna run build
to create the build files with the added chains.
Reinstalling dependencies
Switching branches, broken package links etc. may cause errors. In such cases you can try removing and installing the dependencies with:
rm -rf node_modules/ services/core/node_modules/ services/verification/node_modules/ services/validation/node_modules/
npx lerna bootstrap
npx lerna run build