Moving to V 2.2.0 can't find helpers. Same code for V1.10.0 works



  • ok @bjrmatos .. I include the same code but just moved to the latest js report.. 2.2.0.. and I now get that same error can't find abs..
    I put the entire project here like last time..
    https://drive.google.com/open?id=1qtx0PKH65TTZt8yP59OlP10jdtvTubQ-

    Moving to the 2.2.0 now has 2 versions of handlers!.. dang..

    I tried the dedupe and it does not.. just has same..

    Can you do some magic here and show me what I can do?

    again this is the sample.. so if get this to work others can also copy it.

    Thank you for helping @bjrmatos .. really appreciate your time


  • administrators

    hi! in jsreport v2 the handlebars version is different so instead of handlebars 4.0.6 now you need the 4.0.11

    to fix it run this command:

    npm uninstall handlebars && npm i handlebars@4.0.11 && npm dedupe

    note: again, the dedupe part is just one time commnad, no need to do in every install



  • This worked!! .. at least locally :) I then pushed to bitbucket and got the 'abs helper not found' but that is probably something on our end. So your suggestion worked.

    Thanks @bjrmatos



  • ok.. @bjrmatos Thanks for all your help so far.

    I am trying to move to the latest 2.2.0.. and while it works local (meaning no error finding the abs helper) it seems to not find the helper when we deploy to bitbucket. And since I can't run it local I can't exactly test it..

    so wonder if you can tel me what would need to change to enable 2.2.0?

    here is my report loading

    const jsreport = require('jsreport')({
        tasks: {
            allowedModules: '*',
            strategy: 'in-process'
        },
        loadConfig: false,
        logger: {
            file: { enabled: false},
            silent: true
        },
        studio: { enabled: false },
        allowLocalFilesAccess: true,
        dataDirectory: path.join(os.tmpdir(), 'jsreport'),
        templatingEngines: {   allowedModules: '*'},
    });
    
    

    and here is my package

    "dependencies": {
        "config": "^1.21.0",
        "debug": "^3.0.1",
        "handlebars": "4.0.11",
        "handlebars-helpers": "0.10.0",
        "handlebars-intl": "1.1.2",
        "jsonwebtoken": "8.2.1",
        "jsreport": "2.2.0",
        "mongoose": "^4.13.17",
        "npm": "^6.4.1",
        "upgrade": "1.1.0",
        "uuid": "^3.1.0"
      },
    
    

    Off the top of your head do you know what I need to do to enable 2.2.0? You had mentioned I did 'not' need to do certain things when using 1.10.. but I assume I need to do something to get 2.2.0 to work?

    any suggestions.

    again all I did was move to 2.2.0 and on bitbucket it says can't find the 'abs'. helper. same issue we had earlier.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.