Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeORM 0.2.27 doesn't connect to react-native-sqlite-storage driver (Error: DriverPackageNotInstalledError: React-Native package has not been found installed) #6811

Closed
oleksandr-dziuban opened this issue Sep 30, 2020 · 6 comments · Fixed by #6814
Labels

Comments

@oleksandr-dziuban
Copy link

oleksandr-dziuban commented Sep 30, 2020

Issue type:

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

Database system/driver:

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

TypeORM version:

[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

TypeORM v0.2.27 doesn't connect to react-native-sqlite-storage driver.
Error is shown:
DriverPackageNotInstalledError: React-Native package has not been found installed. Try to install it: npm install react-native-sqlite-storage --save

TypeORM v0.2.24 works fine. TypeORM v0.2.26 cannot be used with react-native as it has broken browser environment issues fixed in v0.2.27.
react-native-sqlite-storage is installed correctly. Used v4.0.0 and v5.0.0.

Looks like the same issue as Hana driver.

@imnotjames
Copy link
Contributor

imnotjames commented Sep 30, 2020

Different issue from hana - this did need to use require instead of PlatformTools.load in the ReactNativeDriver

Thanks for the report

imnotjames added a commit to imnotjames/typeorm that referenced this issue Sep 30, 2020
Because react native uses the browser context we can't use `PlatformTools.load` so this reverts the behavior for this file to use a standard `require` call

Fixes typeorm#6811
imnotjames added a commit to imnotjames/typeorm that referenced this issue Sep 30, 2020
Because react native uses the browser context we can't use `PlatformTools.load` so this reverts the behavior for this file to use a standard `require` call

Fixes typeorm#6811
@imnotjames
Copy link
Contributor

Can you check if #6814 fixes your issue?

@imnotjames imnotjames added the bug label Sep 30, 2020
@oleksandr-dziuban
Copy link
Author

#6814

Will do, one moment

@oleksandr-dziuban
Copy link
Author

@imnotjames It's working perfectly now, thanks a lot! What do you think how soon community could deploy 0.2.28 with this fix?

@imnotjames
Copy link
Contributor

imnotjames commented Oct 1, 2020

There's a few other related fixes we will probably be trying to get in for 0.2.29 - no exact ETA but definitely before the end of October! Hopefully much sooner than that.

pleerock pushed a commit that referenced this issue Oct 1, 2020
Because react native uses the browser context we can't use `PlatformTools.load` so this reverts the behavior for this file to use a standard `require` call

Fixes #6811
@oleksandr-dziuban
Copy link
Author

There's a few other related fixes we will probably be trying to get in for 0.2.29 - no exact ETA but definitely before the end of October! Hopefully much sooner than that.

Ok, thanks a lot

zaro pushed a commit to zaro/typeorm that referenced this issue Jan 12, 2021
Because react native uses the browser context we can't use `PlatformTools.load` so this reverts the behavior for this file to use a standard `require` call

Fixes typeorm#6811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants