Skip to content
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

Build Failure After Updating and Attempting to Merge Changes #5301

Open
paulo-rossy opened this issue Oct 1, 2024 · 4 comments
Open

Build Failure After Updating and Attempting to Merge Changes #5301

paulo-rossy opened this issue Oct 1, 2024 · 4 comments

Comments

@paulo-rossy
Copy link
Contributor

I recently attempted to update to the latest version and encountered a build failure during the merge process. After running the yarn build command, the build failed with the following error:

@open-condo/miniapp-utils#build: command (/app/packages/miniapp-utils) /tmp/xfs-25ee4603/yarn run build exited (1)
Tasks: 3 successful, 6 total
Cached: 0 cached, 6 total
Time: 1m52.803s
Failed: @open-condo/miniapp-utils#build

ERROR run failed: command exited (1)

It seems to be related to the @open-condo/miniapp-utils package, specifically an issue with an ArrayIterator type not being recognized correctly, as seen in this part of the error:

@open-condo/miniapp-utils:build: Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 9 more.

Additionally, there was a Docker build failure at this point:

Dockerfile:64

RUN set -ex \
    && yarn build \
    && rm -rf /app/out \
    && rm -rf /app/.env  \
    && rm -rf /app/.config /app/.cache /app/.docker  \
    && ls -lah /app/

The full error message:

ERROR: process "/bin/sh -c set -ex     && yarn build     && rm -rf /app/out     && rm -rf /app/.env      && rm -rf /app/.config /app/.cache /app/.docker      && ls -lah /app/" did not complete successfully: exit code: 1

Is there any known issue with the @open-condo/miniapp-utils package, or could it be related to a type mismatch in the iterator? Any guidance on resolving this would be greatly appreciated.

@toplenboren
Copy link
Member

Hello, i'm sorry for the delayed response, but can you please clarify, do you have the problem now? :-) We have had some changes made in miniapps :-(

@paulo-rossy
Copy link
Contributor Author

paulo-rossy commented Oct 29, 2024

Hello, i'm sorry for the delayed response, but can you please clarify, do you have the problem now? :-) We have had some changes made in miniapps :-(

@toplenboren, Hello,

Thank you for your response. The previous issue has been resolved, but now I've encountered a new error during the build process. When running yarn build, the build fails with the following error:

#27 692.6 @app/miniapp:build:     at Module.require (node:internal/modules/cjs/loader:1100:19) {
#27 692.6 @app/miniapp:build:   code: 'MODULE_NOT_FOUND',
#27 692.6 @app/miniapp:build:   requireStack: [
#27 692.6 @app/miniapp:build:     '/app/packages/keystone/stitchSchema.js',
#27 692.6 @app/miniapp:build:     '/app/packages/codegen/generate.condo.server.utils.js',
#27 692.6 @app/miniapp:build:     '/app/apps/miniapp/domains/condo/utils/serverSchema/index.js',
#27 692.6 @app/miniapp:build:     '/app/apps/miniapp/domains/condo/utils/access.js',
#27 692.6 @app/miniapp:build:     '/app/apps/miniapp/middlewares/oidc.js',
#27 692.6 @app/miniapp:build:     '/app/apps/miniapp/index.js',
#27 692.6 @app/miniapp:build:     '/app/node_modules/@keystonejs/keystone/bin/commands/build.js',
#27 692.6 @app/miniapp:build:     '/app/node_modules/@keystonejs/keystone/bin/cli.js'
#27 692.6 @app/miniapp:build:   ]
#27 692.6 @app/miniapp:build: }
#27 692.7 @app/miniapp:build: ERROR: command finished with error: command (/app/apps/miniapp) /tmp/xfs-c6b321d6/yarn run build exited (1)
#27 692.8 @app/miniapp#build: command (/app/apps/miniapp) /tmp/xfs-c6b321d6/yarn run build exited (1)
...

I investigated further and found that the modules @graphql-tools/links, @graphql-tools/stitch, and @graphql-tools/wrap imported in packages/keystone/stitchSchema.js are not found. It seems that the error arises due to these missing modules.

I've tried reinstalling dependencies and clearing caches, but the issue persists. Could this be related to a missing or outdated dependency in the package configuration?

Thank you!

@pahaz
Copy link
Member

pahaz commented Nov 7, 2024

Hi, could you please update your project from our main branch. We've fixed some issue.

@paulo-rossy
Copy link
Contributor Author

paulo-rossy commented Nov 8, 2024

Hi, could you please update your project from our main branch. We've fixed some issue.

@pahaz, Hello!

Yes, the previously reported issues have been fixed, thank you for that! However, there's a new TypeScript error that has come up. I've temporarily ignored it using // @ts-ignore, but I would appreciate it if you could take a look.

The error occurs when running yarn build in packages/miniapp-utils

Here’s the output:

packages/miniapp-utils/src/helpers/uuid.ts

src/hooks/usePrevious.ts → ./dist/cjs/hooks/usePrevious.js, ./dist/esm/hooks/usePrevious.js...
(!) [plugin typescript] @rollup/plugin-typescript TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'.
created ./dist/cjs/hooks/usePrevious.js, ./dist/esm/hooks/usePrevious.js in 2.9s
src/helpers/uuid.ts:15:9 - error TS2322: Type 'Buffer' is not assignable to type 'Uint8Array'.
  The types returned by 'entries()' are incompatible between these types.
    Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 9 more.

15         randomValues = randomBytes(16)
           ~~~~~~~~~~~~

Found 1 error in src/helpers/uuid.ts:15.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants