I am trying to build and getting a bunch of warning, but also an error in code that was just recently changed
chatbot-ui@2.0.0 build
next build
▲ Next.js 14.1.0
Environments: .env.local
Creating an optimized production build ...
[PWA] Compile server
[PWA] Compile server
[PWA] Compile client (static)
[PWA] Custom worker found: /home/ubuntu/rivet/chatbot-ui/worker/index.js
[PWA] Build custom worker: /home/ubuntu/rivet/chatbot-ui/public/worker-udmcjq7EsIXtqU3o8I2iQ.js
[PWA] Auto register service worker with: /home/ubuntu/rivet/chatbot-ui/node_modules/next-pwa/register.js
[PWA] Service worker: /home/ubuntu/rivet/chatbot-ui/public/sw.js
[PWA] url: /sw.js
[PWA] scope: /
✓ Compiled successfully
./app/[locale]/[workspaceid]/layout.tsx
71:6 Warning: React Hook useEffect has missing dependencies: 'fetchWorkspaceData', 'router', and 'workspaceId'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
88:6 Warning: React Hook useEffect has missing dependencies: 'fetchWorkspaceData', 'setChatFiles', 'setChatImages', 'setChatMessages', 'setFirstTokenReceived', 'setIsGenerating', 'setNewMessageFiles', 'setNewMessageImages', 'setSelectedChat', 'setShowFilesDisplay', and 'setUserInput'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./app/[locale]/login/password/page.tsx
23:6 Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./app/[locale]/setup/page.tsx
100:6 Warning: React Hook useEffect has missing dependencies: 'router', 'setAvailableHostedModels', 'setAvailableOpenRouterModels', 'setEnvKeyMap', and 'setProfile'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-hooks/use-scroll.tsx
29:6 Warning: React Hook useEffect has a missing dependency: 'userScrolled'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
35:6 Warning: React Hook useEffect has missing dependencies: 'isGenerating', 'scrollToBottom', and 'userScrolled'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-hooks/use-select-file-handler.tsx
33:6 Warning: React Hook useEffect has a missing dependency: 'handleFilesToAccept'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-input.tsx
82:6 Warning: React Hook useEffect has a missing dependency: 'handleFocusChatInput'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-settings.tsx
47:6 Warning: React Hook useEffect has missing dependencies: 'chatSettings' and 'setChatSettings'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-ui.tsx
77:6 Warning: React Hook useEffect has missing dependencies: 'fetchChat', 'fetchMessages', 'handleFocusChatInput', 'params.chatid', 'scrollToBottom', and 'setIsAtBottom'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/messages/message-markdown.tsx
21:18 Warning: Using <img> could result in slower LCP and higher bandwidth. Consider using <Image /> from next/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
21:18 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text
./components/messages/message.tsx
127:6 Warning: React Hook useEffect has a missing dependency: 'message.content'. Either include it or remove the dependency array. If 'setEditedMessage' needs the current value of 'message.content', you can also switch to useReducer instead of useState and read 'message.content' in the reducer. react-hooks/exhaustive-deps
./components/setup/profile-step.tsx
49:37 Warning: React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead. react-hooks/exhaustive-deps
./components/sidebar/items/all/sidebar-update-item.tsx
171:6 Warning: React Hook useEffect has missing dependencies: 'contentType', 'fetchDataFunctions', 'fetchSelectedWorkspaces', 'item.id', and 'workspaces.length'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/announcements.tsx
53:6 Warning: React Hook useEffect has a missing dependency: 'announcements'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/global-state.tsx
153:6 Warning: React Hook useEffect has a missing dependency: 'fetchStartingData'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/profile-settings.tsx
244:37 Warning: React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead. react-hooks/exhaustive-deps
./components/workspace/workspace-settings.tsx
76:6 Warning: React Hook useEffect has a missing dependency: 'selectedWorkspace?.image_path'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
I am trying to build and getting a bunch of warning, but also an error in code that was just recently changed
▲ Next.js 14.1.0
Environments: .env.local
Creating an optimized production build ...
./app/[locale]/[workspaceid]/layout.tsx 71:6 Warning: React Hook useEffect has missing dependencies: 'fetchWorkspaceData', 'router', and 'workspaceId'. Either include them or remove the dependency array. react-hooks/exhaustive-deps 88:6 Warning: React Hook useEffect has missing dependencies: 'fetchWorkspaceData', 'setChatFiles', 'setChatImages', 'setChatMessages', 'setFirstTokenReceived', 'setIsGenerating', 'setNewMessageFiles', 'setNewMessageImages', 'setSelectedChat', 'setShowFilesDisplay', and 'setUserInput'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./app/[locale]/login/password/page.tsx 23:6 Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./app/[locale]/setup/page.tsx 100:6 Warning: React Hook useEffect has missing dependencies: 'router', 'setAvailableHostedModels', 'setAvailableOpenRouterModels', 'setEnvKeyMap', and 'setProfile'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-hooks/use-scroll.tsx 29:6 Warning: React Hook useEffect has a missing dependency: 'userScrolled'. Either include it or remove the dependency array. react-hooks/exhaustive-deps 35:6 Warning: React Hook useEffect has missing dependencies: 'isGenerating', 'scrollToBottom', and 'userScrolled'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-hooks/use-select-file-handler.tsx 33:6 Warning: React Hook useEffect has a missing dependency: 'handleFilesToAccept'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-input.tsx 82:6 Warning: React Hook useEffect has a missing dependency: 'handleFocusChatInput'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-settings.tsx 47:6 Warning: React Hook useEffect has missing dependencies: 'chatSettings' and 'setChatSettings'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/chat/chat-ui.tsx 77:6 Warning: React Hook useEffect has missing dependencies: 'fetchChat', 'fetchMessages', 'handleFocusChatInput', 'params.chatid', 'scrollToBottom', and 'setIsAtBottom'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/messages/message-markdown.tsx 21:18 Warning: Using
<img>
could result in slower LCP and higher bandwidth. Consider using<Image />
fromnext/image
to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element 21:18 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text./components/messages/message.tsx 127:6 Warning: React Hook useEffect has a missing dependency: 'message.content'. Either include it or remove the dependency array. If 'setEditedMessage' needs the current value of 'message.content', you can also switch to useReducer instead of useState and read 'message.content' in the reducer. react-hooks/exhaustive-deps
./components/setup/profile-step.tsx 49:37 Warning: React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead. react-hooks/exhaustive-deps
./components/sidebar/items/all/sidebar-update-item.tsx 171:6 Warning: React Hook useEffect has missing dependencies: 'contentType', 'fetchDataFunctions', 'fetchSelectedWorkspaces', 'item.id', and 'workspaces.length'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/announcements.tsx 53:6 Warning: React Hook useEffect has a missing dependency: 'announcements'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/global-state.tsx 153:6 Warning: React Hook useEffect has a missing dependency: 'fetchStartingData'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
./components/utility/profile-settings.tsx 244:37 Warning: React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead. react-hooks/exhaustive-deps
./components/workspace/workspace-settings.tsx 76:6 Warning: React Hook useEffect has a missing dependency: 'selectedWorkspace?.image_path'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules Linting and checking validity of types ...Failed to compile.
./app/api/chat/anthropic/route.ts:27:38 Type error: Property 'messages' does not exist on type 'Anthropic'.
25 | }) 26 |