Bug report
Describe the bug
TypeScript compilation fails when using @supabase/auth-js because it imports from @solana/wallet-standard-features without declaring it as a dependency. This causes a "Cannot find module" error during TypeScript builds.
The issue is in src/lib/types.ts where Solana wallet types are imported, but the required package isn't listed in package.json.
To Reproduce
Steps to reproduce the behavior:
-
Create a new TypeScript project with Supabase:
npm init -y
npm install @supabase/supabase-js typescript
npx tsc --init
-
Create a simple TypeScript file that imports Supabase:
import { createClient } from '@supabase/supabase-js'
const supabase = createClient('url', 'key')
-
Run TypeScript compilation:
-
See the error:
node_modules/@supabase/auth-js/dist/module/lib/types.d.ts:3:60 - error TS2307:
Cannot find module '@solana/wallet-standard-features' or its corresponding type declarations.
Expected behavior
TypeScript should compile successfully without requiring users to manually install additional dependencies that Supabase internally uses.
The package should either:
- Include
@solana/wallet-standard-features as a dependency, or
- Declare it as a peer dependency with proper documentation
Screenshots
Not applicable - this is a compilation error.
System information
- OS: macOS (also affects Windows/Linux)
- Browser: Not applicable (build-time error)
- Version of supabase-js: 2.50.2 (latest)
- Version of Node.js: 18.x / 20.x
Additional context
Workaround: Installing the missing dependency manually fixes the issue:
npm install @solana/wallet-standard-features
Root cause: The import exists in src/lib/types.ts:3 but the dependency is missing from package.json.
This affects anyone using Supabase with TypeScript in their build pipeline. The @solana/wallet-standard-features package is legitimate and maintained (currently v1.3.0), so this appears to be related to the new Solana authentication features.