jsreport v2 beta released - asking for a feedback



  • I forgot I had done those as well. So, I tried the link you posted above. That didn't work.

    I did have a second node_module directory and doing it in that directory works but not in the one I need it to work. I even deleted the directory and tried an install and that didn't work. Then copied over the beta directory from the second directory and that didn't work. Finally, I moved the node_modules directory and that didn't work.

    Error:

    0 info it worked if it ends with ok
    1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
    1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
    1 verbose cli 'install' ]
    2 info using npm@5.6.0
    3 info using node@v8.9.4
    4 verbose npm-session 4e6bb2eb4fdc27a6
    5 silly install runPreinstallTopLevelLifecycles
    6 silly preinstall jsreport-server@
    7 info lifecycle jsreport-server@~preinstall: jsreport-server@
    8 silly install loadCurrentTree
    9 silly install readLocalPackageData
    10 silly install loadIdealTree
    11 silly install cloneCurrentTreeToIdealTree
    12 silly install loadShrinkwrap
    13 silly saveTree jsreport-server@
    14 verbose stack SyntaxError: Unexpected end of JSON input
    14 verbose stack at JSON.parse (<anonymous>)
    14 verbose stack at module.exports (C:\Program Files\nodejs\node_modules\npm\lib\utils\parse-json.js:3:15)
    14 verbose stack at BB.join (C:\Program Files\nodejs\node_modules\npm\lib\install\read-shrinkwrap.js:31:20)
    14 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
    14 verbose stack at Holder$3._callFunction (eval at generateHolderClass (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\join.js:92:16), <anonymous>:14:44)
    14 verbose stack at Holder$3.checkFulfillment (eval at generateHolderClass (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\join.js:92:16), <anonymous>:29:30)
    14 verbose stack at Promise.eval (eval at thenCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\join.js:14:16), <anonymous>:6:20)
    14 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:566:21)
    14 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
    14 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
    14 verbose stack at Promise._fulfill (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:638:18)
    14 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:582:21)
    14 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
    14 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
    14 verbose stack at Promise._fulfill (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:638:18)
    14 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\nodeback.js:42:21
    15 verbose cwd C:\dev\src\Apps\JsReports
    16 verbose Windows_NT 10.0.15063
    17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
    18 verbose node v8.9.4
    19 verbose npm v5.6.0
    20 error Unexpected end of JSON input
    21 verbose exit [ 1, true ]



  • Okay, now I"m confused.

    I think I got the beta version installed. When I run the studio at localhost:5488, it has a title of "jsreport 2.0.0-beta development'. But when I do a 'npm view jsreport version' I get 1.10.0. I would guess the title of the dev studio means I got the correct version?

    Thanks.


  • administrators

    I think I got the beta version installed. When I run the studio at localhost:5488, it has a title of "jsreport 2.0.0-beta development'. But when I do a 'npm view jsreport version' I get 1.10.0. I would guess the title of the dev studio means I got the correct version?

    seems like you have problem with the directories in your machine and this is getting into trouble of how npm installation works. this is a general node.js problem so we can not help here if you don't share more details like what is the full path of your project, how are you running the npm installation? is it just from the command line at the same path of your project directory? if possible please describe all the steps that you are doing, like opening command line at some path, running some command, etc. try to install the v2 beta in clean directory first before trying to update an existing project.



  • Did you get rid of being able to add assets in scripts. In version 1.9.2, I could add a asset to any script by using '{#asset Global-BeforeRender.js @encoding=utf8}'. This allow for some global functions and handling of variables the same way from script to script.


  • administrators

    hi @hluikartjr no, this should be working fine in v2, i tested it and it works, do you have a case where it does not work? if so, please share some code in playground that does not work in v2



  • @bjrmatos, thanks for the fast response.
    The playground link provided above is not working. I found the problem.
    I was adding the asset to the top of the scripts outside of any beforeRender function. First line asset looked like this 'var startDate = new Date(req.options.startDate);'
    followed by others that refer to 'req.options' where each script would pass the options from script to script.
    The error I was getting was 'ReferenceError: req is not defined'.


  • administrators

    @hluikartjr ahh my bad, anyway great that you were able to solve your issue. for future reference the correct link to playground is this



  • Review of v2:
    I like the commit feature. but, it needs a wait wheel or something to indicate that it is working.
    The 'Freeze edits' does not allow for running a report from the 'Run'. return 'Error: Editing is frozen through jsreport-freeze extension.
    at D:\jsreportV2\node_modules\jsreport-freeze\lib\freeze.js:31:13
    at <anonymous>'
    Also, 'Release freeze' is not unfreezing and allowing the report to run either.


  • administrators

    Review of v2:
    I like the commit feature. but, it needs a wait wheel or something to indicate that it is working.

    thanks, agree with you, that operation can take a while with lot of entities and an indicator will be handy indeed.

    The 'Freeze edits' does not allow for running a report from the 'Run'. return 'Error: Editing is frozen through jsreport-freeze extension.
    at D:\jsreportV2\node_modules\jsreport-freeze\lib\freeze.js:31:13
    at <anonymous>'
    Also, 'Release freeze' is not unfreezing and allowing the report to run either.

    i can confirm this bug with freeze extension, thanks for taking the time to test it, we will fix it



  • This is more of a feature then a bug. could the 'freeze edits' be per item not globally. The reason for this is we use some global scripts that need modifying, while most of the script do not. It would be good to lock editing on the ones that should never be modified and allow editing on the ones that will be modified.



  • @hluikartjr Thanks for the idea. We were discussing this feature and it seems to us that you should rather use authorization in this scenario. You could create an extra user with read only permissions to all entities and write permissions to those you consider safe to change. The freeze should always block everything in our current opinion. However we are open to change of course.


Log in to reply
 

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