nicoalbanese / kirimase

Build full-stack Next.js apps, incredibly fast
https://kirimase.dev
MIT License
2.65k stars 120 forks source link

Conflicting peer dependency drizzle #198

Closed Frazic closed 5 months ago

Frazic commented 5 months ago

Config File

{
  "hasSrc": false,
  "packages": [
    "shadcn-ui",
    "drizzle",
    "lucia"
  ],
  "preferredPackageManager": "npm",
  "t3": false,
  "alias": "@",
  "analytics": true,
  "rootPath": "",
  "componentLib": "shadcn-ui",
  "driver": "pg",
  "provider": "postgresjs",
  "orm": "drizzle",
  "auth": "lucia"
}

Describe the bug When running kirimase init with version 0.0.58 I get error Conflicting peer dependency: react@18.2.0

To Reproduce Steps to reproduce the behavior:

  1. npx create-next-app - Say yes to all defaults (Typescript, tailwind, estlint, etc)
  2. cd into created directory
  3. kirimase init - NPM, ShadcnUI, Drizzle, Postgres, Postgres.JS, Lucia

Expected behavior kirimase init should run successfully

Desktop (please complete the following information):

Additional context Error log:

# npm resolution error report

While resolving: rpg-wiki-ai@0.1.0
Found: react@18.3.1
node_modules/react
  peer react@"^18.2.0" from next@14.2.4
  node_modules/next
    next@"14.2.4" from the root project
  peer react@"^18.3.1" from react-dom@18.3.1
  node_modules/react-dom
    peer react-dom@"^18.2.0" from next@14.2.4
    node_modules/next
      next@"14.2.4" from the root project
    react-dom@"^18" from the root project
  peer react@">= 16.8.0 || 17.x.x || ^18.0.0-0" from styled-jsx@5.1.1
  node_modules/styled-jsx
    styled-jsx@"5.1.1" from next@14.2.4
    node_modules/next
      next@"14.2.4" from the root project
  react@"^18" from the root project

Could not resolve dependency:
drizzle-orm@"*" from the root project

Conflicting peer dependency: react@18.2.0
node_modules/react
  peer react@"18.2.0" from react-native@0.74.2
  node_modules/react-native
    peer react-native@">0.73.0" from @op-engineering/op-sqlite@6.0.7
    node_modules/@op-engineering/op-sqlite
      peerOptional @op-engineering/op-sqlite@">=2" from drizzle-orm@0.31.2
      node_modules/drizzle-orm
        drizzle-orm@"*" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
nicoalbanese commented 5 months ago

Thanks for reporting! This seems to be specific to using npm/npx and drizzle. As a solution, I would I suggest using pnpm but should you prefer to use npm, you can try the solutions here: https://stackoverflow.com/questions/78412358/i-am-getting-an-error-when-install-the-drizzle-orm-npm-package-in-my-nextjs-14-a

As a future solution, I'm looking to have packages added to the package json before they are installed so if the installation fails, you can run <package-manager> install without having to install everything again.

Frazic commented 5 months ago

Can confirm that it worked with pnpm, thanks!

nicoalbanese commented 5 months ago

Happy to hear! Also linking this for context: https://github.com/drizzle-team/drizzle-orm/issues/2251