Developer FAQ¶
When I am running local, how can I close my store for testing purposes only?¶
- Quick and Dirty Solution:
- Using the UI, close the till
- Using the UI, close the device
- Manually insert a CLOSED record into the
ops_unit_statustable. E.g.,You'll have to tweak the above SQL to suit your DEVICE_ID, BUSINESS_UNIT, SEQUENCE_NUMBER, timestamps, etc.INSERT INTO OPS_UNIT_STATUS ( DEVICE_ID,BUSINESS_UNIT_ID,SEQUENCE_NUMBER,UNIT_ID, UNIT_TYPE,UNIT_STATUS,BUSINESS_DATE,CREATE_TIME, CREATE_BY,LAST_UPDATE_TIME,LAST_UPDATE_BY) VALUES ( '05243-001','05243',11,'05243', 'STORE','CLOSED','20200923','2020-09-23 15:20:51.863', '001111','2020-09-23 15:20:51.863','001111' );
- Graceful Solution: Update
ctx_buttonsto enable the Close Store button and then close the store using the UI.
Troubleshooting¶
- Error: Can't resolve 'core-js/es7/reflect'
- Update the
tsconfig.app.jsonfile with these path entries:"paths": { "core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"], "core-js/es6/*": ["../node_modules/core-js/es/*"] }
- Update the
- Full example:
{ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "baseUrl": "./", "module": "es2015", "types": [], "paths": { "core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"], "core-js/es6/*": ["../node_modules/core-js/es/*"] } }, "include": [ "**/*.ts", "../node_modules/@jumpmind/openpos-client-core-lib/**/*.ts" ], "exclude": [ "test.ts", "**/*.spec.ts", "../node_modules/@jumpmind/openpos-client-core-lib/**/*.spec.ts" ] } -
Error TS2304: Cannot find name 'bigint'
- Install Typescript version
3.2.4or laternpm i typescript@3.2.4 --save-dev
- Install Typescript version
-
My compilation is failing on due to missing code that should be generated by lombok, what do I do?
First ensure that you have the lombok plugin for IntelliJ Idea.
Most modern branches of commerce should have this issue resolved, but if you're having this issue you're likely not working on a modern branch or commerce. This was a bug discovered in lombok and exposed by IntelliJ 2020.3 (or later). You can refer to mplushnikov/lombok-intellij-plugin#988 for information about that bug. The TL;DR version of it is: Update lobok to version 1.18.16 (or later). You may refer to #2650 to see how this was updated in commerce.
You may still experience issues compiling generated code soon after updating lombok. This has something to do with some fancy caching going on. You can disable this to continue by adding
-Djps.track.ap.dependencies=falseto your VM build options. The VM build options are located in your IntelliJ preferences:Preferences > Build, Execution, Deployment > Compiler > User-local build process VM options -
When running commerce-client on Android, manual personalization fails.
Your android application needs to have the
usesCleartextTrafficattribute set:<application ... android:usesCleartextTraffic="true">If you are using capacitor for the application deployment, you need to add the above attribute into your
android/app/src/main/AndroidManifest.xmlfile.See this stack overflow article for details.