astriaorg / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
0 stars 0 forks source link

Fix `yarn install && yarn build` #3

Open jbowen93 opened 2 years ago

jbowen93 commented 2 years ago

There is an issue caused by pino-std-serializer and @types/pino-std-serializers where the latter is imported but doesn't contain any actual type definitions. Instead it imports the former into a sub directory.

This results in this error

yarn build
yarn run v1.22.19
$ yarn lerna run build
$ /Users/joshbowen/Code/astriaorg/temp/optimism/node_modules/.bin/lerna run build
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 10 packages: "yarn run build"
lerna info run Ran npm script 'build' in '@eth-optimism/core-utils' in 1.4s:
$ tsc -p tsconfig.json
lerna ERR! yarn run build exited 2 in '@eth-optimism/hardhat-deploy-config'
lerna ERR! yarn run build stdout:
$ tsc -p tsconfig.json
error TS2688: Cannot find type definition file for 'pino-std-serializers'.
  The file is in the program because:
    Entry point for implicit type library 'pino-std-serializers'
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
error Command failed with exit code 2.
lerna ERR! yarn run build exited 2 in '@eth-optimism/hardhat-deploy-config'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

See: https://github.com/microsoft/TypeScript/issues/27956#issuecomment-430849185

This can be manually resolved by moving pino-std-serializer up a level and deleting @types/pino-std-serializers

This may be related to the below issue/PR: https://github.com/pinojs/pino-std-serializers/pull/30 https://github.com/pinojs/pino/issues/910