WiseLibs / better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.
MIT License
5.21k stars 390 forks source link

Lucia 3 and better-sqlite3 v10.0 adapter #1214

Closed FilippoSalvarani21 closed 2 days ago

FilippoSalvarani21 commented 2 days ago

Hello, I'm trying to use Lucia Auth but when I install the sqlite adapter it says:

% npm install @lucia-auth/adapter-sqlite
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @lucia-auth/adapter-sqlite@3.0.1
npm ERR! Found: better-sqlite3@10.0.0
npm ERR! node_modules/better-sqlite3
npm ERR!   better-sqlite3@"^10.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional better-sqlite3@"8.x - 9.x" from @lucia-auth/adapter-sqlite@3.0.1
npm ERR! node_modules/@lucia-auth/adapter-sqlite
npm ERR!   @lucia-auth/adapter-sqlite@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: better-sqlite3@9.6.0
npm ERR! node_modules/better-sqlite3
npm ERR!   peerOptional better-sqlite3@"8.x - 9.x" from @lucia-auth/adapter-sqlite@3.0.1
npm ERR!   node_modules/@lucia-auth/adapter-sqlite
npm ERR!     @lucia-auth/adapter-sqlite@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

It looks like my version of better-sqlite3 is not supported. Is it ok to downgrade or should I force the Lucia installation? Thank you

mceachen commented 2 days ago

This is a question for lucia-auth, not this library--but know that I bump the major version on the offchance we could break existing consumers, which includes dropping support for old versions of Node.js and Electron.

There haven't been breaking API changes made to this library for as long as I can remember.

If you're on a supported Node.js runtime, you should be safe with v11.1.1 (the current build) if your code works with v8 or v9.