Closed lissettecarlr closed 3 months ago
Hi @lissettecarlr thanks for pointing out we will try to replicate.
we informed nvl team they are looking at this
Got the same error, DEV branch was working fine until yesterday for me, when I tried to build again this error appeared.
Achieve a temporary fix by making these changes:
"@neo4j-nvl/base": "0.3.1", # "^0.3.1" changed to "0.3.1"
"@neo4j-nvl/react": "0.3.1", # "^0.3.1" changed to "0.3.1"
WORKDIR /app
COPY package.json yarn.lock ./
# RUN yarn add @neo4j-nvl/base @neo4j-nvl/react # Remove or comment this line
RUN yarn cache clean # Don't know if this is needed, but added anyway
RUN yarn install
COPY . ./
Hi @elheremes Did you get any type errors after you tried docker-compose
Hi @elheremes Did you get any type errors after you tried docker-compose
No errors after these changes.
@elheremes which node version you are using?
@elheremes which node version you are using?
I'm pretty certain its node:20, didn't change any of that. Going to post the entire content of the Dockerfile and package.json I'm using:
{
"name": "neo4j-needle-starterkit",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite --host 0.0.0.0",
"build": "tsc && vite build",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"lint": "eslint --ext .ts --ext .tsx . --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.10",
"@mui/styled-engine": "^5.15.9",
"@neo4j-devtools/word-color": "^0.0.8",
"@neo4j-ndl/base": "^2.11.6",
"@neo4j-ndl/react": "^2.15.10",
"@neo4j-nvl/base": "0.3.1",
"@neo4j-nvl/react": "0.3.1",
"@react-oauth/google": "^0.12.1",
"@types/uuid": "^9.0.7",
"axios": "^1.6.5",
"clsx": "^2.1.1",
"eslint-plugin-react": "^7.33.2",
"neo4j-driver": "^5.14.0",
"re-resizable": "^6.9.16",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
"react-markdown": "^9.0.1",
"react-router": "^6.23.1",
"react-router-dom": "^6.23.1",
"remark-gfm": "^4.0.0",
"tailwind-merge": "^2.3.0",
"uuid": "^9.0.1"
},
"devDependencies": {
"@types/node": "^20.11.10",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.17",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.33",
"prettier": "^2.7.1",
"react-dropzone": "^14.2.3",
"tailwindcss": "^3.4.1",
"typescript": "^5.0.2",
"vite": "^4.5.3"
}
}
# Step 1: Build the React application
FROM node:20 AS build
ARG BACKEND_API_URL="http://localhost:8000"
ARG REACT_APP_SOURCES=""
ARG LLM_MODELS=""
ARG GOOGLE_CLIENT_ID=""
ARG BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
ARG TIME_PER_CHUNK=4
ARG TIME_PER_PAGE=50
ARG LARGE_FILE_SIZE=5242880
ARG CHUNK_SIZE=5242880
ARG CHAT_MODES=""
ARG ENV="DEV"
WORKDIR /app
COPY package.json yarn.lock ./
# RUN yarn add @neo4j-nvl/base @neo4j-nvl/react
RUN yarn cache clean
RUN yarn install
COPY . ./
RUN BACKEND_API_URL=$BACKEND_API_URL \
REACT_APP_SOURCES=$REACT_APP_SOURCES \
LLM_MODELS=$LLM_MODELS \
GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID \
BLOOM_URL=$BLOOM_URL \
TIME_PER_CHUNK=$TIME_PER_CHUNK \
CHUNK_SIZE=$CHUNK_SIZE \
ENV=$ENV \
LARGE_FILE_SIZE=${LARGE_FILE_SIZE} \
CHAT_MODES=$CHAT_MODES \
yarn run build
# Step 2: Serve the application using Nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
Sorry if I'm not responding clearly, I don't have much experience using docker environments.
Thanks for the help,I tried modifying frontend/package.json and frontend/Dockerfile, but the error message during the build remained unchanged.
vim frontend/package.json
"@neo4j-nvl/base": "^0.3.2" -> "@neo4j-nvl/base": "^0.3.1",
"@neo4j-nvl/react": "^0.3.2", -> "@neo4j-nvl/base": "^0.3.1",
and
vim frontend/Dockerfile
# Step 1: Build the React application
FROM node:20 AS build
ARG BACKEND_API_URL="http://localhost:8000"
ARG REACT_APP_SOURCES=""
ARG LLM_MODELS=""
ARG GOOGLE_CLIENT_ID=""
ARG BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
ARG TIME_PER_CHUNK=4
ARG TIME_PER_PAGE=50
ARG LARGE_FILE_SIZE=5242880
ARG CHUNK_SIZE=5242880
ARG CHAT_MODES=""
ARG ENV="DEV"
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn cache clean :q
RUN yarn install
COPY . ./
RUN BACKEND_API_URL=$BACKEND_API_URL \
REACT_APP_SOURCES=$REACT_APP_SOURCES \
LLM_MODELS=$LLM_MODELS \
GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID \
BLOOM_URL=$BLOOM_URL \
TIME_PER_CHUNK=$TIME_PER_CHUNK \
CHUNK_SIZE=$CHUNK_SIZE \
ENV=$ENV \
LARGE_FILE_SIZE=${LARGE_FILE_SIZE} \
CHAT_MODES=$CHAT_MODES \
yarn run build
# Step 2: Serve the application using Nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
I only modified these two places above, then compiled, and the error log was exactly the same as before.
Hi @lissettecarlr and @elheremes
As temporary fix add nvl packages in resolutions in package.json and remove
yarn add @neo4j-nvl/base @neo4j-nvl/react
from frontend docker
For the references check Branch
EX:
"resolutions": {
"@neo4j-nvl/base": "0.3.1",
"@neo4j-nvl/react":"0.3.1"
}
I used the new branch: origin/Concurrent-Processing-of-files, and successfully deployed it with Docker. Thanks~
I used the new branch: origin/Concurrent-Processing-of-files, and successfully deployed it with Docker. Thanks~
can confirm. default branch docker will not build. new branch builds without error
Yes DEV version is updated with these changes
Hi, I updated my package.json with the one in DEV branch but keep having same problem, I did clean install remove cache etc, is there anything else that require changes?
Hey @maxlawdify NVL team released the 0.3.3 version they resolved all the issues. refer to the DEV branch package.json and vite.config.ts for successfully building the project.
When I used the main branch, I encountered similar errors. After checking the issues, I learned that I should use the dev branch, but errors still occurred. Below are the commands I executed
The error log is as follows: