Hello!
I have an urgent issue with using netlify and motherduck.
Error: Can’t find the home directory at ‘’
Specify a home directory using the SET home_directory=‘/path/to/dir’ option.
Here’s my code
import { DuckDBInstance } from '@duckdb/node-api'
import { createServerFn, createServerOnlyFn } from '@tanstack/react-start'
import { writeFileSync, unlinkSync, mkdtempSync } from 'fs'
import { tmpdir } from 'os'
import { join } from 'path'
let duckDBInstance: DuckDBInstance | null = null
// let duckDBInstance: null = null
// const DB_DIR = './tmp'
// const DB_PATH = join(DB_DIR, 'myduck.db')
export const getDuckDB = createServerOnlyFn(async () => {
if (!duckDBInstance) {
duckDBInstance = await DuckDBInstance.create(
`md:my_db?token=${process.env.MD_ACCESS_TOKEN}`,
)
}
return duckDBInstance
})
doing SET home_directory = '/tmp', does nothing.
Any help is appreciated I need to submit this project soon 😭