We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I follow the installation and setup steps and I got this error.
-babel.config.js:
module.exports = { presets: [ 'module:metro-react-native-babel-preset', '@babel/preset-typescript', ], plugins: [ ['react-native-reanimated/plugin'], [ 'babel-plugin-root-import', { rootPathPrefix: '~', rootPathSuffix: 'src', }, ], 'babel-plugin-transform-typescript-metadata', ['@babel/plugin-proposal-decorators', { legacy: true }], ['@babel/plugin-proposal-class-properties', { loose: true }], ['@babel/plugin-transform-private-methods', { loose: true }], ['@babel/plugin-transform-private-property-in-object', { loose: true }] ], };
import {Database} from '@nozbe/watermelondb'; import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';
import schema from './schema'; // import migrations from './migrations'; import Treatment from './treatements'; import Visit from './visits';
const adapter = new SQLiteAdapter({ dbName: 'appv3', schema, // migrations, jsi: true /* Platform.OS === 'ios' */, onSetUpError: error => { console.log(error); }, });
export const database = new Database({ adapter, modelClasses: [ Treatment, Visit, // and so on ], });
import { appSchema, tableSchema } from "@nozbe/watermelondb" import { tableName } from './table-name';
const schema = appSchema({ version: 1, tables: [ tableSchema({ name: tableName.VISITS, columns: [ { name: 'name', type: 'string' } ], }), tableSchema({ name: tableName.TREATMENTS, columns: [ { name: 'name', type: 'string' } ], }), ], });
export default schema;
The text was updated successfully, but these errors were encountered:
Try jsi: false when you're using new arch. Will be added support to new arch soon.
Sorry, something went wrong.
No branches or pull requests
I follow the installation and setup steps and I got this error.
-babel.config.js:
module.exports = {
presets: [
'module:metro-react-native-babel-preset',
'@babel/preset-typescript',
],
plugins: [
['react-native-reanimated/plugin'],
[
'babel-plugin-root-import',
{
rootPathPrefix: '~',
rootPathSuffix: 'src',
},
],
'babel-plugin-transform-typescript-metadata',
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-transform-private-methods', { loose: true }],
['@babel/plugin-transform-private-property-in-object', { loose: true }]
],
};
import {Database} from '@nozbe/watermelondb';
import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite';
import schema from './schema';
// import migrations from './migrations';
import Treatment from './treatements';
import Visit from './visits';
const adapter = new SQLiteAdapter({
dbName: 'appv3',
schema,
// migrations,
jsi: true /* Platform.OS === 'ios' */,
onSetUpError: error => {
console.log(error);
},
});
export const database = new Database({
adapter,
modelClasses: [
Treatment,
Visit,
// and so on
],
});
import { appSchema, tableSchema } from "@nozbe/watermelondb"
import { tableName } from './table-name';
const schema = appSchema({
version: 1,
tables: [
tableSchema({
name: tableName.VISITS,
columns: [
{ name: 'name', type: 'string' }
],
}),
tableSchema({
name: tableName.TREATMENTS,
columns: [
{ name: 'name', type: 'string' }
],
}),
],
});
export default schema;
The text was updated successfully, but these errors were encountered: