ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
16.46k stars 1.54k forks source link

ERROR [perplexica-frontend 5/5] RUN yarn build Failed to compile #163

Closed Patrice44 closed 5 months ago

Patrice44 commented 5 months ago

Perplexica 1.5 running fine . Tried the new 1.6 version. I used the same procedure to install

got the following errors at the end of the front-end build

[+] Building 48.4s (9/9) FINISHED                                                                                                                 docker:default
 => [perplexica-frontend internal] load build definition from app.dockerfile                                                                                0.1s
 => => transferring dockerfile: 308B                                                                                                                        0.0s
 => [perplexica-frontend internal] load metadata for docker.io/library/node:alpine                                                                          0.8s
 => [perplexica-frontend internal] load .dockerignore                                                                                                       0.1s
 => => transferring context: 55B                                                                                                                            0.0s
 => [perplexica-frontend internal] load build context                                                                                                       0.1s
 => => transferring context: 2.12kB                                                                                                                         0.1s
 => [perplexica-frontend 1/5] FROM docker.io/library/node:alpine@sha256:167cd81f6af47b02b3e67e8ae3755551c5ac19ce6843882c7c5bce9f46b0bc35                    0.0s
 => CACHED [perplexica-frontend 2/5] WORKDIR /home/perplexica                                                                                               0.0s
 => CACHED [perplexica-frontend 3/5] COPY ui /home/perplexica/                                                                                              0.0s
 => CACHED [perplexica-frontend 4/5] RUN yarn install                                                                                                       0.0s
 => ERROR [perplexica-frontend 5/5] RUN yarn build                                                                                                         47.3s
------                                                                                                                                                           
 > [perplexica-frontend 5/5] RUN yarn build:                                                                                                                     
0.806 yarn run v1.22.19                                                                                                                                          
0.912 $ next build                                                                                                                                               
1.988 Attention: Next.js now collects completely anonymous telemetry regarding usage.                                                                            
1.989 This information is used to shape Next.js' roadmap and prioritize features.                                                                                
1.989 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.989 https://nextjs.org/telemetry
1.989 
2.156    ▲ Next.js 14.1.4
2.156 
2.294    Creating an optimized production build ...
5.756 (node:41) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
5.756 (Use `node --trace-deprecation ...` to show where the warning was created)
23.57 (node:91) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
23.57 (Use `node --trace-warnings ...` to show where the warning was created)
24.42 (node:91) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
37.10  ✓ Compiled successfully
37.10    Linting and checking validity of types ...
46.06 Failed to compile.
46.06 
46.07 ./components/EmptyChat.tsx:15:22
46.07 Type error: Type '{ size: number; className: string; }' is not assignable to type 'IntrinsicAttributes & { className?: string | undefined; }'.
46.07   Property 'size' does not exist on type 'IntrinsicAttributes & { className?: string | undefined; }'.
46.07 
46.07   13 |   return (
46.07   14 |     <div className="relative">
46.07 > 15 |       <ThemeSwitcher size={17} className="absolute top-2 right-0 lg:hidden" />
46.07      |                      ^
46.07   16 |
46.07   17 |       <div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-8">
46.07   18 |         <h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
46.25 error Command failed with exit code 1.
46.25 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

I am running latest version of docker and docker-compose on Ubuntu 24.04 on ARM64 Turing PI / RK1 ubuntu@Turing4:/mnt/docker_storage/Perplexica$ uname -a Linux Turing4 6.1.0-1013-rockchip #13-Ubuntu SMP Thu May 9 21:20:56 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux I have done an apt update / upgrade Tried a second time : same error

bigsk1 commented 5 months ago

passing a prop called size to this component, which is not defined in its props type

modify in theme/switcher.tsx to read

const ThemeSwitcher = ({ className, size }: { className?: string; size?: number }) => {

tarpediem commented 5 months ago

=> ERROR [perplexica-frontend 5/5] RUN yarn build 14.8s


[perplexica-frontend 5/5] RUN yarn build:
0.264 yarn run v1.22.19
0.284 $ next build
0.613 Attention: Next.js now collects completely anonymous telemetry regarding usage.
0.613 This information is used to shape Next.js' roadmap and prioritize features.
0.613 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: 0.613 https://nextjs.org/telemetry 0.613 0.670 ▲ Next.js 14.1.4 0.670 0.717 Creating an optimized production build ... 1.707 (node:41) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 1.707 (Use node --trace-deprecation ... to show where the warning was created) 7.171 (node:127) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. 7.171 (Use node --trace-warnings ... to show where the warning was created) 7.426 (node:127) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 11.34 ✓ Compiled successfully 11.34 Linting and checking validity of types ... 14.49 Failed to compile. 14.49 14.49 ./components/EmptyChat.tsx:15:22 14.49 Type error: Type '{ size: number; className: string; }' is not assignable to type 'IntrinsicAttributes & { className?: string | undefined; }'. 14.49 Property 'size' does not exist on type 'IntrinsicAttributes & { className?: string | undefined; }'. 14.49 14.49 13 | return ( 14.49 14 |
14.49 > 15 | 14.49 | ^ 14.49 16 | 14.49 17 |
14.49 18 |

14.52 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 14.52 error Command failed with exit code 1.

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

Having the same error on ubuntu 22.04 (tuxedo-OS) with latest docker Linux lobster 6.5.0-10040-tuxedo #44 SMP PREEMPT_DYNAMIC Wed May 8 17:36:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

fishscene commented 5 months ago

This should get you back up and running until this is resolved: git clone -b v1.5.0 https://github.com/ItzCrazyKns/Perplexica.git

freeurmind commented 5 months ago

passing a prop called size to this component, which is not defined in its props type

modify in theme/switcher.tsx to read

const ThemeSwitcher = ({ className, size }: { className?: string; size?: number }) => {

thanks, it works for me now.

➜  Perplexica git:(master)
docker compose up -d

[+] Building 56.2s (10/10) FINISHED                                                                                                docker:orbstack
 => [perplexica-frontend internal] load build definition from app.dockerfile                                                                  0.0s
 => => transferring dockerfile: 308B                                                                                                          0.0s
 => [perplexica-frontend internal] load metadata for docker.io/library/node:alpine                                                            0.7s
 => [perplexica-frontend internal] load .dockerignore                                                                                         0.0s
 => => transferring context: 55B                                                                                                              0.0s
 => [perplexica-frontend 1/5] FROM docker.io/library/node:alpine@sha256:167cd81f6af47b02b3e67e8ae3755551c5ac19ce6843882c7c5bce9f46b0bc35      0.0s
 => [perplexica-frontend internal] load build context                                                                                         0.0s
 => => transferring context: 16.30kB                                                                                                          0.0s
 => CACHED [perplexica-frontend 2/5] WORKDIR /home/perplexica                                                                                 0.0s
 => [perplexica-frontend 3/5] COPY ui /home/perplexica/                                                                                       0.1s
 => [perplexica-frontend 4/5] RUN yarn install                                                                                               21.8s
 => [perplexica-frontend 5/5] RUN yarn build                                                                                                 23.7s
 => [perplexica-frontend] exporting to image                                                                                                  9.8s
 => => exporting layers                                                                                                                       9.8s
 => => writing image sha256:36b9744933f640943689ba92b07694516f6c78f77e7491978f809cf604e2c67c                                                  0.0s
 => => naming to docker.io/library/perplexica-perplexica-frontend                                                                       
 ✔ Network perplexica_perplexica-network       Created                                                                                        0.1s
 ✔ Container perplexica-searxng-1              Started                                                                                        0.3s
 ✔ Container perplexica-perplexica-backend-1   Started                                                                                        0.4s
 ✔ Container perplexica-perplexica-frontend-1  Started                                                                                        0.7s
delfireinoso commented 5 months ago

I have the same problem on MacOS 14.5. I can get to 1.5 or modify as advised, but it should be fixed

[perplexica-frontend 5/5] RUN yarn build: 0.157 yarn run v1.22.19 0.169 $ next build 0.409 Attention: Next.js now collects completely anonymous telemetry regarding usage. 0.410 This information is used to shape Next.js' roadmap and prioritize features. 0.410 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: 0.410 https://nextjs.org/telemetry 0.410 0.452 ▲ Next.js 14.1.4 0.452 0.487 Creating an optimized production build ... 1.250 (node:41) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 1.250 (Use node --trace-deprecation ... to show where the warning was created) 6.088 (node:103) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. 6.088 (Use node --trace-warnings ... to show where the warning was created) 6.315 (node:103) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 10.18 ✓ Compiled successfully 10.19 Linting and checking validity of types ... 12.40 Failed to compile. 12.40 12.40 ./components/EmptyChat.tsx:15:22 12.40 Type error: Type '{ size: number; className: string; }' is not assignable to type 'IntrinsicAttributes & { className?: string | undefined; }'. 12.40 Property 'size' does not exist on type 'IntrinsicAttributes & { className?: string | undefined; }'. 12.40 12.40 13 | return ( 12.40 14 |
12.40 > 15 | 12.40 | ^ 12.40 16 | 12.40 17 |
12.40 18 |

12.43 error Command failed with exit code 1. 12.43 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

delfireinoso commented 5 months ago

go to the file: Perplexica/ui/components/theme/Switcher.tsx

change the line that begins with const ThemeSwitcher = to

const ThemeSwitcher = ({ className, size }: { className?: string; size?: number }) => {

this solves the problem

ItzCrazyKns commented 5 months ago

Fixed in the latest release