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]: build error #156

Open
1 task done
jinzishuai opened this issue Dec 5, 2023 · 2 comments
Open
1 task done

[Bug]: build error #156

jinzishuai opened this issue Dec 5, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jinzishuai
Copy link
Collaborator

Contact Details

No response

What happened?

merge PR #154 failed https://github.com/aitok-ai/LibreChat/actions/runs/7082672532/job/19273801438

Steps to Reproduce

╭─   ~/src/aitok-ai/LibreChat   main *8 ?10 ·······································································································  2m 32s  22:04:59
╰─❯ docker build -f Dockerfile.multi --target api-build -t librechat-dev-api .
[+] Building 103.2s (21/22)                                                                                                                            docker:desktop-linux
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 97B                                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile.multi                                                                                                             0.0s
 => => transferring dockerfile: 1.04kB                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/node:19-alpine                                                                                                      0.0s
 => CACHED [base 1/6] FROM docker.io/library/node:19-alpine                                                                                                            0.0s
 => [internal] load build context                                                                                                                                      0.3s
 => => transferring context: 8.09MB                                                                                                                                    0.3s
 => [base 2/6] WORKDIR /app/api                                                                                                                                        0.0s
 => [base 3/6] COPY api/package*.json ./                                                                                                                               0.1s
 => [base 4/6] COPY api/ ./                                                                                                                                            0.0s
 => [base 5/6] RUN touch .env                                                                                                                                          0.1s
 => [base 6/6] RUN npm install                                                                                                                                        56.9s
 => [client-build  1/11] WORKDIR /app/client                                                                                                                           0.0s
 => [client-build  2/11] COPY ./client/ ./                                                                                                                             0.1s
 => [client-build  3/11] WORKDIR /app/packages/data-provider                                                                                                           0.0s 
 => [client-build  4/11] COPY ./packages/data-provider ./                                                                                                              0.0s 
 => [client-build  5/11] RUN npm install                                                                                                                               6.8s 
 => [client-build  6/11] RUN npm run build                                                                                                                             3.5s 
 => [client-build  7/11] RUN mkdir -p /app/client/node_modules/librechat-data-provider/                                                                                0.2s 
 => [client-build  8/11] RUN cp -R /app/packages/data-provider/* /app/client/node_modules/librechat-data-provider/                                                     0.6s 
 => [client-build  9/11] WORKDIR /app/client                                                                                                                           0.0s 
 => [client-build 10/11] RUN npm install                                                                                                                              33.7s 
 => ERROR [client-build 11/11] RUN npm run build                                                                                                                       0.9s 
------                                                                                                                                                                      
 > [client-build 11/11] RUN npm run build:                                                                                                                                  
0.456                                                                                                                                                                       
0.456 > @librechat/frontend@0.6.1 build                                                                                                                                     
0.456 > cross-env NODE_ENV=production vite build                                                                                                                            
0.456 
0.647 vite v4.5.1 building for production...
0.668 transforming...
0.861 ✓ 3 modules transformed.
0.861 ✓ built in 213ms
0.861 [vite]: Rollup failed to resolve import "react-ga" from "/app/client/src/main.jsx".
0.861 This is most likely unintended because it can break your application at runtime.
0.861 If you do want to externalize this module explicitly add it to
0.861 `build.rollupOptions.external`
0.865 error during build:
0.865 Error: [vite]: Rollup failed to resolve import "react-ga" from "/app/client/src/main.jsx".
0.865 This is most likely unintended because it can break your application at runtime.
0.865 If you do want to externalize this module explicitly add it to
0.865 `build.rollupOptions.external`
0.865     at viteWarn (file:///app/client/node_modules/vite/dist/node/chunks/dep-68d1a114.js:48216:27)
0.865     at onwarn (/app/client/node_modules/@vitejs/plugin-react/dist/index.cjs:258:9)
0.865     at onRollupWarning (file:///app/client/node_modules/vite/dist/node/chunks/dep-68d1a114.js:48245:9)
0.865     at onwarn (file:///app/client/node_modules/vite/dist/node/chunks/dep-68d1a114.js:47976:13)
0.865     at file:///app/client/node_modules/rollup/dist/es/shared/node-entry.js:24276:13
0.865     at Object.logger [as onLog] (file:///app/client/node_modules/rollup/dist/es/shared/node-entry.js:25950:9)
0.865     at ModuleLoader.handleInvalidResolvedId (file:///app/client/node_modules/rollup/dist/es/shared/node-entry.js:24862:26)
0.865     at file:///app/client/node_modules/rollup/dist/es/shared/node-entry.js:24822:26
0.865     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
------
Dockerfile.multi:30
--------------------
  28 |     RUN npm install
  29 |     ENV NODE_OPTIONS="--max-old-space-size=2048"
  30 | >>> RUN npm run build
  31 |     
  32 |     # Node API setup
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jinzishuai jinzishuai added the bug Something isn't working label Dec 5, 2023
@jinzishuai
Copy link
Collaborator Author

jinzishuai commented Dec 5, 2023

problem in https://github.com/danny-avila/LibreChat/blob/main/client/src/main.jsx

we don't have this extra line in upstream

import ReactGA from 'react-ga';

but we need it for the following lines

if (trackingId) {
  ReactGA.initialize(trackingId);
}

jinzishuai added a commit that referenced this issue Dec 5, 2023
* #156:  update package.json from upstream

* sync client build configs

* add react-ga and aggrid package to client package
@jinzishuai
Copy link
Collaborator Author

jinzishuai added a commit that referenced this issue Dec 5, 2023
jinzishuai added a commit that referenced this issue May 20, 2024
* #156:  update package.json from upstream

* sync client build configs

* add react-ga and aggrid package to client package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant