This line copies all files from the src/messages folder into dist including this .ts file, which can then end up getting compiled which depending on your setup fails with:
./node_modules/@chainsafe/libp2p-gossipsub/dist/src/message/decodeRpc.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
The change here is to mark it import type as per the error. An alternative (better?) would be to not copy it into dist, either way would solve the problem.
This line copies all files from the
src/messages
folder intodist
including this.ts
file, which can then end up getting compiled which depending on your setup fails with:The change here is to mark it
import type
as per the error. An alternative (better?) would be to not copy it intodist
, either way would solve the problem.