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

Project Initial Launch and Run Time Errors #74

Open
QRMarketing opened this issue Nov 6, 2024 · 0 comments
Open

Project Initial Launch and Run Time Errors #74

QRMarketing opened this issue Nov 6, 2024 · 0 comments

Comments

@QRMarketing
Copy link

The good news is that the project ran (compiled) to completion (fixing the too big 5mb image bug). However, ran into other issues when i tried to fire it up.

  1. Couldn't resolve these dependencies ... though i tried to get ChatGPT to help me fix them.

ERESOLVE could not resolve
[0] npm error
[0] npm error While resolving: [email protected]
[0] npm error Found: [email protected]
[0] npm error node_modules/react
[0] npm error react@"^18.3.1" from the root project
[0] npm error peer react@">=16.8.0" from @floating-ui/[email protected]
[0] npm error node_modules/@floating-ui/react-dom
[0] npm error @floating-ui/react-dom@"^2.0.0" from @radix-ui/[email protected]
[0] npm error node_modules/@radix-ui/react-popper
[0] npm error @radix-ui/react-popper@"1.2.0" from @radix-ui/[email protected]
[0] npm error node_modules/@radix-ui/react-hover-card
[0] npm error @radix-ui/react-hover-card@"^1.1.1" from the root project
[0] npm error 4 more (@radix-ui/react-menu, @radix-ui/react-popover, ...)
[0] npm error 84 more (@paypal/react-paypal-js, @radix-ui/react-accordion, ...)
[0] npm error
[0] npm error Could not resolve dependency:
[0] npm error peer react@"^16.9.0" from [email protected]
[0] npm error node_modules/use-screenshot-hook
[0] npm error use-screenshot-hook@"^1.0.2" from the root project
[0] npm error
[0] npm error Conflicting peer dependency: [email protected]
[0] npm error node_modules/react
[0] npm error peer react@"^16.9.0" from [email protected]
[0] npm error node_modules/use-screenshot-hook
[0] npm error use-screenshot-hook@"^1.0.2" from the root project

But "npm run dev --force" got me around this in the end.

  1. RootState defined twice below is what ChartGPT did to temporarily fix it)

Here’s how your final code should look:
typescript
Copy code
// Remove this initial RootState interface
// interface RootState {
// auth: AuthState;
// language: string;
// notifications: Notification[];
// }

// At the bottom, keep this type declaration for RootState:
export type RootState = ReturnType;
This change ensures there’s only one RootState type that adapts automatically to any changes in your rootReducer.

  1. The EINVALIDPACKAGENAME error is occurring because entries like "@/components/ui/button": "*" in your dependencies

Again from ChatGPT:

Remove Invalid Entries from dependencies: Delete the entries like "@/components/ui/button": "*" from dependencies in your package.json. Your internal components shouldn’t appear in dependencies because they’re not standalone packages.

Rely on Path Aliases for Importing: Since you have @/* configured as an alias in tsconfig.json, you can still import these components using @/components/ui/button in your code. The tsconfig.json will direct the project to the appropriate path within the source directory, but they shouldn't be listed in package.json.

Your dependencies section should look like this after removing the problematic entries:

json
Copy code
"dependencies": {
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
// ... other dependencies
"zod": "^3.23.8",
"lodash": "*"
}

  1. So at this point the app sorta starts up but lots of console errors ... most likely due to previous issues .... centering around this: [email protected]

I just post this to help ... or maybe it doesn't .... as you say its alpha .... if this is not useful ... just delete this.

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