Skip to content

Developer FAQ

When I am running local, how can I close my store for testing purposes only?

  1. 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_status table. E.g.,
      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'
      );
      
      You'll have to tweak the above SQL to suit your DEVICE_ID, BUSINESS_UNIT, SEQUENCE_NUMBER, timestamps, etc.
  2. Graceful Solution: Update ctx_buttons to enable the Close Store button and then close the store using the UI.

Troubleshooting

  1. Error: Can't resolve 'core-js/es7/reflect'
    • Update the tsconfig.app.json file with these path entries: "paths": { "core-js/es7/reflect": ["../node_modules/core-js/proposals/reflect-metadata"], "core-js/es6/*": ["../node_modules/core-js/es/*"] }
  2. 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"
         ]
     }
    
  3. Error TS2304: Cannot find name 'bigint'

    • Install Typescript version 3.2.4 or later
      npm i typescript@3.2.4 --save-dev
      
  4. 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=false to 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

  5. When running commerce-client on Android, manual personalization fails.

    Your android application needs to have the usesCleartextTraffic attribute 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.xml file.

    See this stack overflow article for details.