yoursunny / NDNts

NDN libraries for the Modern Web
https://ndnts-docs.ndn.today
ISC License
31 stars 9 forks source link

got "Cannot find module '@yoursunny/psync-bloom' or its corresponding type declarations" when running `pnpm run build` #14

Closed jacobbubu closed 1 year ago

jacobbubu commented 1 year ago
node ➜ /workspaces/NDNts (main) $ pnpm run build                                  

> @ndn/root@ build /workspaces/NDNts
> bash mk/build.sh

packages/sync/src/psync/codec.ts(2,34): error TS2307: Cannot find module '@yoursunny/psync-bloom' or its corresponding type declarations.
packages/sync/src/psync/partial-publisher.ts(6,29): error TS2307: Cannot find module '@yoursunny/psync-bloom' or its corresponding type declarations.
packages/sync/src/psync/partial-subscriber.ts(5,65): error TS2307: Cannot find module '@yoursunny/psync-bloom' or its corresponding type declarations.

Start with a clean container (Debian GNU/Linux 11 (bullseye), NodeJS v18.13.0, pnpm 7.27.0) and run pnpm i first, followed by pnpm run build.

jacobbubu commented 1 year ago

This problem occurs in a container environment and NDNts is a directory mounted from the host. The symbolic links created by pnpm will have a different form under the container than under the host. I don't know exactly what the cause is, but it's clearly not a problem with NDNts.