Column type for UserModel#userId is not defined and cannot be guessed. Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json.
See original GitHub issueColumn type for UserModel#userId is not defined and cannot be guessed. Make sure you have turned on an “emitDecoratorMetadata”: true option in tsconfig.json. Also make sure you have imported “reflect-metadata” on top of the main entry file in your application (before any entity imported).If you are using JavaScript instead of TypeScript you must explicitly provide a column type. ExceptionsManager.js:76 Module AppRegistry is not a registered callable module (calling runApplication)
package.json
{ "name": "janmanch", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest" }, "dependencies": { "@babel/runtime": "^7.1.2", "@ldn0x7dc/react-native-view-pager": "0.0.9", "npm": "^6.1.0", "react": "16.3.1", "react-native": "0.57.0", "react-native-bottomsheet": "^1.9.0", "react-native-datepicker": "^1.7.2", "react-native-device-info": "^0.21.5", "react-native-elements": "^0.19.1", "react-native-flexi-radio-button": "^0.2.2", "react-native-localization": "^1.0.10", "react-native-permissions": "^1.1.1", "react-native-splash-screen": "^3.0.9", "react-native-sqlite-storage": "^3.3.6", "react-native-swiper": "^1.5.13", "react-native-vector-icons": "^4.6.0", "react-navigation": "^2.3.1", "realm": "^2.8.4", "reflect-metadata": "^0.1.12", "remove": "^0.1.5", "typeorm": "^0.2.7" }, "devDependencies": { "@babel/plugin-external-helpers": "^7.0.0", "@babel/plugin-proposal-decorators": "^7.1.2", "@types/jest": "23.1.0", "@types/react": "16.3.18", "@types/react-native": "0.55.20", "@types/react-native-datepicker": "^1.6.3", "@types/react-navigation": "^2.0.5", "@types/react-test-renderer": "16.0.1", "babel-jest": "23.0.1", "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-preset-react-native": "4.0.0", "jest": "23.1.0", "metro-react-native-babel-preset": "^0.47.0", "react-native-typescript-transformer": "1.2.10", "react-test-renderer": "16.3.1", "schedule": "0.4.0", "ts-jest": "22.4.6", "typescript": "2.9.2" }, "jest": { "preset": "react-native", "transform": { "^.+\\.(js)$": "<rootDir>/node_modules/babel-jest", "\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js" }, "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", "moduleFileExtensions": [ "ts", "tsx", "js", "jsx", "json", "node" ], "modulePaths": [ "<rootDir>" ] } }
tsconfig
{ "compilerOptions": { "allowSyntheticDefaultImports": true, "allowJs": true, "esModuleInterop": true, "jsx": "react", "module": "es6", "moduleResolution": "node", "noEmit": true, "noImplicitAny": true, "target": "es6", /*Below code custom added*/ "baseUrl": "./src", // "skipLibCheck": true, "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, // "outDir": "./build" }, "include": ["./src"], "exclude": ["node_modules"] }
Issue Analytics
- State:
- Created 5 years ago
- Comments:29 (2 by maintainers)
Top Related StackOverflow Question
@Column()must set a type,like@Column('text',{nullable:true})In your tsconfig.json, you can explicitly specify
"strict": false,to disable strict type-checking.