-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: share fedimint types from @fedimint/types package #277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time run of the nix mprocs builds failed:
@fedimint/utils:build: src/format.tsx(1,23): error TS2307: Cannot find module '@fedimint/types' or its corresponding type decl
arations.
@fedimint/utils:build:
@fedimint/utils:build: Error: error occured in dts build
@fedimint/utils:build: at Worker.<anonymous> (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/index.js:2067:22)
@fedimint/utils:build: at Worker.emit (node:events:514:28)
@fedimint/utils:build: at MessagePort.<anonymous> (node:internal/worker:243:53)
@fedimint/utils:build: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)
@fedimint/utils:build: at exports.emitMessage (node:internal/per_context/messageport:23:28)
@fedimint/utils:build: DTS Build error
@fedimint/utils:build: Error: Failed to compile. Check the logs above.
@fedimint/utils:build: at error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:198:30)
@fedimint/utils:build: at throwPluginError (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21718:
12)
@fedimint/utils:build: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22672:20)
@fedimint/utils:build: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21895:42)
@fedimint/utils:build: at Object.transform (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/rollup.js:8400:20)
@fedimint/utils:build: at /Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22879:40
@fedimint/utils:build: error Command failed with exit code 1.
@fedimint/utils:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@fedimint/utils:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@fedimint/utils:build: error Command failed with exit code 1.
@fedimint/utils:build: ERROR: command finished with error: command (/Users/willo/code/fedimint-ui/packages/utils) yarn run bui
ld exited (1)
command (/Users/willo/code/fedimint-ui/packages/utils) yarn run build exited (1)
Tasks: 0 successful, 5 total
Cached: 0 cached, 5 total
Time: 8.495s
ERROR run failed: command exited (1)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Likely a dependency chain misconfiguration.
is this the case with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to actually run the projects? I'm still getting build errors:
@fedimint/utils:dev: src/format.tsx(1,23): error TS7016: Could not find a declaration file for module '@fedimint/types'. '/Use
rs/willo/code/fedimint-ui/packages/types/dist/index.js' implicitly has an 'any' type.
@fedimint/utils:dev: Try `npm i --save-dev @types/fedimint__types` if it exists or add a new declaration (.d.ts) file contai
ning `declare module '@fedimint/types';`
@fedimint/utils:dev:
@fedimint/utils:dev: Error: error occured in dts build
@fedimint/utils:dev: at Worker.<anonymous> (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/index.js:2067:22)
@fedimint/utils:dev: at Worker.emit (node:events:514:28)
@fedimint/utils:dev: at MessagePort.<anonymous> (node:internal/worker:243:53)
@fedimint/utils:dev: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)
@fedimint/utils:dev: at exports.emitMessage (node:internal/per_context/messageport:23:28)
@fedimint/utils:dev: DTS Build failed
@fedimint/utils:dev: Error: Failed to compile. Check the logs above.
@fedimint/utils:dev: at error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:198:30)
@fedimint/utils:dev: at throwPluginError (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21718:12
)
@fedimint/utils:dev: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22672:20)
@fedimint/utils:dev: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21895:42)
@fedimint/utils:dev: at Object.transform (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/rollup.js:8400:20)
@fedimint/utils:dev: at /Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22879:40
@fedimint/utils:build: src/format.tsx(1,23): error TS7016: Could not find a declaration file for module '@fedimint/types'. '/U
sers/willo/code/fedimint-ui/packages/types/dist/index.js' implicitly has an 'any' type.
@fedimint/utils:build: Try `npm i --save-dev @types/fedimint__types` if it exists or add a new declaration (.d.ts) file cont
aining `declare module '@fedimint/types';`
A subsequent run gets me:
@fedimint/ui:build: src/Login.tsx(12,32): error TS7016: Could not find a declaration file for module '@fedimint/utils'. '/User
s/willo/code/fedimint-ui/packages/utils/dist/index.js' implicitly has an 'any' type.
@fedimint/ui:build: Try `npm i --save-dev @types/fedimint__utils` if it exists or add a new declaration (.d.ts) file contain
ing `declare module '@fedimint/utils';`
@fedimint/ui:build:
@fedimint/ui:build: Error: error occured in dts build
@fedimint/ui:build: at Worker.<anonymous> (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/index.js:2067:22)
@fedimint/ui:build: at Worker.emit (node:events:514:28)
@fedimint/ui:build: at MessagePort.<anonymous> (node:internal/worker:243:53)
@fedimint/ui:build: at [nodejs.internal.kHybridDispatch] (node:internal/event_target:741:20)
@fedimint/ui:build: at exports.emitMessage (node:internal/per_context/messageport:23:28)
@fedimint/ui:build: DTS Build error
@fedimint/ui:build: Error: Failed to compile. Check the logs above.
@fedimint/ui:build: at error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:198:30)
@fedimint/ui:build: at throwPluginError (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21718:12)
@fedimint/ui:build: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22672:20)
@fedimint/ui:build: at Object.error (/Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:21895:42)
@fedimint/ui:build: at Object.transform (/Users/willo/code/fedimint-ui/node_modules/tsup/dist/rollup.js:8400:20)
@fedimint/ui:build: at /Users/willo/code/fedimint-ui/node_modules/rollup/dist/shared/rollup.js:22879:40
@fedimint/ui:build: error Command failed with exit code 1.
@fedimint/ui:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@fedimint/ui:build: ERROR: command finished with error: command (/Users/willo/code/fedimint-ui/packages/ui) yarn run build exi
ted (1)
So I think after repeated builds, your dist
folders get built out, but it seems it's still a bit of a race condition. I recommend deleting all the dist / build folders before running to replicate.
EDIT: FWIW I'm running just gate
or yarn nix-gateway
to replicate this, since it runs everything.
Yeah i can't build this branch locally, same errors |
ack. marking draft and debugging |
@Kodylow, @wbobeirne , turns out parallelism in cleaning dist and build dirs helped me reproduce what y'all were seeing earlier |
- moves bitcoin, fedimint, module and gateway types to shared package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mprocs dev and yarn build now work out of the box, thanks!
Adds a dedicated types package for developing fedimint experiences
Closes #201