You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm migrating from Node.js to Bun and using TypeORM with SQLite3 in Bun. However, I encounter an error after bundling.
bun install sqlite3 typeorm reflect-metadata
constAppDataSource=newDataSource({type: 'sqlite',database: 'sqlite.db',synchronize: true,entities: ['src/models/*.ts']})AppDataSource.initialize().then(()=>{console.log('Data Source has been initialized!')}).catch(err=>{console.error('Error during Data Source initialization',err)})
It can be work in development, but got error in build env
bun build src/app.ts --compile --outfile dist/app
cd dist
./app
error: SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
at new W2 (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/error/TypeORMError.js:9:9)
at new AS (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/error/DriverPackageNotInstalledError.js:10:9)
at loadDependencies (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/driver/sqlite/SqliteDriver.js:143:19)
at new kx (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/driver/sqlite/SqliteDriver.js:25:14)
at create (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/driver/DriverFactory.js:44:24)
at new jC (node_modules/.pnpm/[email protected][email protected]/node_modules/typeorm/data-source/DataSource.js:56:59)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm migrating from Node.js to Bun and using TypeORM with SQLite3 in Bun. However, I encounter an error after bundling.
It can be work in development, but got error in build env
bun build src/app.ts --compile --outfile dist/app cd dist ./app
Beta Was this translation helpful? Give feedback.
All reactions