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

[Bug]: => ERROR [frontend builder 4/4] RUN yarn build #2259

Open
mdreamfly opened this issue Feb 24, 2024 · 3 comments
Open

[Bug]: => ERROR [frontend builder 4/4] RUN yarn build #2259

mdreamfly opened this issue Feb 24, 2024 · 3 comments
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working Stale

Comments

@mdreamfly
Copy link

What happened?

A bug happened!
failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1

Relevant log output

------
 > [frontend builder 4/4] RUN yarn build:
0.462 yarn run v1.22.19
0.485 $ next build
1.212 Attention: Next.js now collects completely anonymous telemetry regarding usage.
1.212 This information is used to shape Next.js' roadmap and prioritize features.
1.213 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
1.213 https://nextjs.org/telemetry
1.213
1.316    ▲ Next.js 14.1.0
1.317
1.407    Creating an optimized production build ...
81.56  ✓ Compiled successfully
81.56    Linting and checking validity of types ...
134.8
134.8 Failed to compile.
134.8
134.8 ./app/App.tsx
134.8 11:8  Warning: Using exported name 'SearchModal' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/components/ActionsBar/components/ChatInput/components/ChatEditor/components/Editor/components/MentionsList/MentionsList.tsx
134.8 6:8  Warning: Using exported name 'TextButton' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/components/ActionsBar/components/ChatInput/index.tsx
134.8 4:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/components/ChatDialogueArea/components/ChatDialogue/components/QADisplay/components/MessageRow/MessageRow.tsx
134.8 4:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/components/ChatDialogueArea/components/ChatDialogue/components/QADisplay/components/MessageRow/components/QuestionBrain/QuestionBrain.tsx
134.8 5:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/components/ChatDialogueArea/components/ChatDialogue/components/QADisplay/components/MessageRow/components/QuestionPrompt/QuestionPrompt.tsx
134.8 3:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/chat/[chatId]/page.tsx
134.8 8:8  Warning: Using exported name 'PageHeader' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/global-error.jsx
134.8 7:16  Error: Use const or class constructors instead of named functions  prefer-arrow/prefer-arrow-functions
134.8
134.8 ./app/invitation/[brainId]/hooks/useInvitation.ts
134.8 46:13  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8 78:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8 110:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8
134.8 ./app/search/page.tsx
134.8 8:8  Warning: Using exported name 'PageHeader' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/studio/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/usePrompt.ts
134.8 158:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8
134.8 ./app/studio/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts
134.8 72:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8 120:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8
134.8 ./app/studio/components/BrainsTabs/components/BrainItem/BrainItem.tsx
134.8 7:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/studio/page.tsx
134.8 7:8  Warning: Using exported name 'PageHeader' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./app/user/page.tsx
134.8 6:8  Warning: Using exported name 'PageHeader' as identifier for default export.  import/no-named-as-default
134.8 8:8  Warning: Using exported name 'QuivrButton' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/AddBrainModal/components/BrainMainInfosStep/BrainMainInfosStep.tsx
134.8 4:8  Warning: Using exported name 'QuivrButton' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/AddBrainModal/components/BrainTypeSelectionStep/BrainTypeSelection/BrainTypeSelection.tsx
134.8 4:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/AddBrainModal/components/BrainTypeSelectionStep/BrainTypeSelectionStep.tsx
134.8 6:8  Warning: Using exported name 'QuivrButton' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/AddBrainModal/components/CreateBrainStep/CreateBrainStep.tsx
134.8 3:8  Warning: Using exported name 'QuivrButton' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/Menu/components/DiscussionButton/DiscussionButton.tsx
134.8 3:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/Menu/components/MenuButton/MenuButton.tsx
134.8 4:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/Menu/components/ThreadsButton/ThreadsSection/ThreadItem/ThreadItem.tsx
134.8 5:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/components/ui/CopyButton.tsx
134.8 3:8  Warning: Using exported name 'Icon' as identifier for default export.  import/no-named-as-default
134.8
134.8 ./lib/hooks/useShareBrain.ts
134.8 84:11  Warning: Caution: `axios` also has a named export `isAxiosError`. Check if you meant to write `import {isAxiosError} from 'axios'` instead.  import/no-named-as-default-member
134.8
134.8 info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
134.9 error Command failed with exit code 1.
134.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1

Twitter / LinkedIn details

No response

@mdreamfly mdreamfly added the bug Something isn't working label Feb 24, 2024
Copy link

dosubot bot commented Feb 24, 2024

🤖

Hey @mdreamfly, great to see you back! Hope you're doing well. 🚀

Based on the error log you've provided, it seems like the build process is failing due to some ESLint warnings and errors in your code. The ESLint warnings are about using exported names as identifiers for default exports and the error is about using named functions instead of const or class constructors.

Here are some steps you can take to resolve these issues:

  1. Fix the ESLint warnings and errors: You can do this by going through each of the files mentioned in the error log and fixing the issues. For example, in ./app/global-error.jsx, you have a named function that ESLint wants you to replace with a const or class constructor. You can do this by changing your function declaration from function myFunction() {...} to const myFunction = () => {...} or class myFunction {...}.

  2. Disable the ESLint rules causing the warnings: If you believe the warnings are not relevant to your project, you can disable the specific ESLint rules causing the warnings. You can do this by adding /* eslint-disable rule-name */ at the top of the files where the rule is causing a warning. However, this should be done with caution as it could potentially hide other important warnings.

  3. Ignore the warnings during the build process: If you want to ignore all warnings during the build process, you can add --max-warnings=0 to the yarn build command in your Dockerfile. This will treat warnings as errors and fail the build if any warnings are found. However, this should be used as a last resort as it could potentially hide important warnings.

In addition to the above, I found some similar issues in the quivr repository that were resolved. You can refer to these issues for more context and potential solutions:

  1. [Bug]: can not use docker-compose -f docker-compose.local.yml up to build Quivr on cloud server
  2. brainId Params Missing / null ------- failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1
  3. [Issue]process "/bin/sh -c yarn build" did not complete successfully

I hope this helps! If you have any other questions or need further clarification, feel free to ask.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label Feb 24, 2024
@StanGirard
Copy link
Collaborator

Can you do a git pull please ?

Copy link
Contributor

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

@github-actions github-actions bot added the Stale label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to frontend functionality or under the /frontend directory bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

2 participants