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

Several errors prevent npm build #3672

Open
vibl opened this issue Jan 14, 2025 · 0 comments
Open

Several errors prevent npm build #3672

vibl opened this issue Jan 14, 2025 · 0 comments

Comments

@vibl
Copy link

vibl commented Jan 14, 2025

When I run npm run build on Onyx nightly-latest-20250111, I get many warnings and a few errors that prevent the build from completing.

Correcting the corresponding bugs in the code solves the errors.

How come these bugs are not preventing you from building the project?

Here are the errors (I'm omitting the warnings for brevity):

./src/app/chat/lib.tsx
668:37  Error: React Hook "useRef" cannot be called in an async function.  react-hooks/rules-of-hooks
669:25  Error: React Hook "useRef" cannot be called in an async function.  react-hooks/rules-of-hooks
670:26  Error: React Hook "useRef" cannot be called in an async function.  react-hooks/rules-of-hooks
671:26  Error: React Hook "useRef" cannot be called in an async function.  react-hooks/rules-of-hooks
673:3  Error: React Hook "useEffect" cannot be called in an async function.  react-hooks/rules-of-hooks
734:3  Error: React Hook "useEffect" cannot be called in an async function.  react-hooks/rules-of-hooks
./src/components/initialSetup/welcome/WelcomeModal.tsx
28:18  Error: React Hook "useRouter" is called in function "_WelcomeModal" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks
30:49  Error: React Hook "useState" is called in function "_WelcomeModal" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks
33:31  Error: React Hook "usePopup" is called in function "_WelcomeModal" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks
35:35  Error: React Hook "useProviderStatus" is called in function "_WelcomeModal" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks
42:3  Error: React Hook "useEffect" is called in function "_WelcomeModal" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".  react-hooks/rules-of-hooks
./src/components/Loading.tsx:3:10
Type error: Module '"react-loader-spinner"' has no exported member 'ThreeDots'. Did you mean to use 'import ThreeDots from "react-loader-spinner"' instead?

  1 | import React, { useState, useEffect } from "react";
  2 | import "./loading.css";
> 3 | import { ThreeDots } from "react-loader-spinner";
    |          ^
  4 |
  5 | interface LoadingAnimationProps {
  6 |   text?: string;
Static worker exited with code: 1 and signal: null

This last bug was solved by upgrading to react-loader-spinner@latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant