Skip to content

Typeorm/browser cannot be compiled since version 0.2.25 #6110

@clfhhc

Description

@clfhhc

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[x] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x ] 0.2.25

Steps to reproduce or a small repository showing the problem:
I have been using Typeorm and Sqljs with Nextjs. I have to transpile module typeorm/browser at build time to generate static HTML files. This had been working until Typeorm upgraded to 0.2.25.

Here's the example repo: https://github.com/Project-Setup/github_sql_pwa/tree/typeorm-0.2.25
To reproduce:

  1. git clone the repo
  2. set up node environment
    nvm install; nvm use; npm install
  3. build pages
    npm run build

an error will come out:

Creating an optimized production build  

Failed to compile.

./node_modules/typeorm/browser/driver/DriverFactory.js
Attempted import error: 'AuroraDataApiPostgresDriver' is not exported from './postgres/PostgresDriver'.


> Build error occurred
Error: > Build failed because of webpack errors

Reverting Typeorm to 0.2.24 will fix the issue.

I think the issue lies in typescript declaration file node_modules/typeorm/browser/driver/postgres/PostgresDriver.d.ts. It may have a problem exporting multiple classes under the current setup, but I wasn't sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions