ivanfioravanti / chatbot-ollama

Chatbot Ollama is an open source chat UI for Ollama.
Other
1.33k stars 217 forks source link

build failed #9

Closed andreas83 closed 9 months ago

andreas83 commented 9 months ago

i tried to build the chat

216:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
221:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
231:6  Warning: React Hook useEffect has a missing dependency: 'defaultModelId'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
305:6  Warning: React Hook useEffect has missing dependencies: 'conversations' and 't'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/Chat/Chat.tsx
232:5  Warning: React Hook useCallback has a missing dependency: 'homeDispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/Chat/ChatInput.tsx
222:6  Warning: React Hook useEffect has a missing dependency: 'textareaRef'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/Chatbar/Chatbar.tsx
158:6  Warning: React Hook useEffect has a missing dependency: 'chatDispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/Promptbar/Promptbar.tsx
117:6  Warning: React Hook useEffect has a missing dependency: 'promptDispatch'. 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
info  - Linting and checking validity of types ...Failed to compile.

./pages/_app.tsx:26:10
Type error: 'Component' cannot be used as a JSX component.
  Its element type 'Component<any, any, any> | ReactElement<any, any> | null' is not a valid JSX element.
    Type 'Component<any, any, any>' is not assignable to type 'Element | ElementClass | null'.
      Type 'Component<any, any, any>' is not assignable to type 'ElementClass'.
        The types returned by 'render()' are incompatible between these types.
          Type 'React.ReactNode' is not assignable to type 'import("/var/www/chat.moving-bytes.at/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").ReactNode'.
            Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
              Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

  24 |       />
  25 |       <QueryClientProvider client={queryClient}>
> 26 |         <Component {...pageProps} />
     |          ^
  27 |       </QueryClientProvider>
  28 |     </div>
  29 |   );
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ivanfioravanti commented 9 months ago

Solved by @ryansereno with PR #10

andreas83 commented 9 months ago

Thank you

andreas83 commented 9 months ago

well, turns out the error happens because i was using yarn instead of npm..