Error occured during reporter init Error: root schema is not valid. errors: rootSchema.properties['blobStorage'].properties['provider'].enum should NOT have duplicate items (items ## 1 and 2 are identical)



  • Hi,

    I just upgrade my node version to the latest and the js report to v 2.11.
    I am getting a lot of warnings 'Filtering out duplicated extension...' from node_modules....

    I deleted the node_modules folder and ran npm install.
    I restarted but when I went to localhost://5501 the browser just displayed a spinner and jsreport studio did not render.
    I closed the browser and restarted, but I am getting the same errors about duplicate extensions.

    Any ideas?

    0_1649778201929_upload-55917b08-f967-43c3-a94c-670ae8376ba2



  • Please share the package.json, jsreport.config.json and the full startup output.



  • attached are the files requested.
    Here is the output:

    PS C:\Development\Projects\Houzskool\Marketing\hz-free-req-jsreport> jsreport start --httpPort=5501
    root schema is not valid. errors: rootSchema.properties['blobStorage'].properties['provider'].enum should NOT have duplicate items (items ## 1 and 2 are identical) (1).
    caused by error (1):
    -> stack
    Error:
    at addDefaultsAndValidateRootSchema (C:\Development\Projects\Houzskool\Marketing\hz-free-req-jsreport\node_modules\jsreport-core\lib\util\schemaValidator.js:193:11)
    at SchemaValidator.setRootSchema (C:\Development\Projects\Houzskool\Marketing\hz-free-req-jsreport\node_modules\jsreport-core\lib\util\schemaValidator.js:110:42)
    at Reporter.extensionsLoad (C:\Development\Projects\Houzskool\Marketing\hz-free-req-jsreport\node_modules\jsreport-core\lib\reporter.js:127:27)
    at async Object.findAndLoadExtensionsCommands (C:\Users\Herb\AppData\Roaming\npm\node_modules@jsreport\jsreport-cli\lib\commander\jsreportInstance.js:95:3)
    at async startCommand (C:\Users\Herb\AppData\Roaming\npm\node_modules@jsreport\jsreport-cli\lib\commander\startCommand.js:91:5)
    at async startProcessing (C:\Users\Herb\AppData\Roaming\npm\node_modules@jsreport\jsreport-cli\lib\commander\startProcessing.js:195:3)

    Thank You

    [1_1649785889091_package.json](Uploading 100%) [0_1649785889090_jsreport.config.json](Uploading 100%)



  • says I don't have privileges[0_1649786100149_package.json]

    Here is package.json

    {
    "name": "jsreport-server",
    "main": "server.js",
    "scripts": {
    "start": "node server",
    "jsreport": "jsreport"
    },
    "jsreport": {
    "entryPoint": "server.js"
    },
    "dependencies": {
    "axios": "^0.21.1",
    "jsreport": "^2.11.0",
    "jsreport-cli": "^2.2.5"
    }
    }

    Here is jsreport.config.json

    {
    "name": "jsreport-server",
    "main": "server.js",
    "scripts": {
    "start": "node server",
    "jsreport": "jsreport"
    },
    "jsreport": {
    "entryPoint": "server.js"
    },
    "dependencies": {
    "axios": "^0.21.1",
    "jsreport": "^2.11.0",
    "jsreport-cli": "^2.2.5"
    }
    }



  • You have posted twice the content of package.json and didn't paste the jsreport.config.json.

    Based on the error message, you use jsreport-cli from the jsreport v3 but jsreport v2.
    Try to call

    npm uninstall -g @jsreport/jsreport-cli
    npm i -g jsreport-cli
    npm i
    jsreport start
    

    Note jsreport v2 runs better with nodejs 14.
    The office recipes and import-export has problems with the node 16.



  • Based on your reply, I got it to work again. I am not using office recipes so I am good with node 16.x. Thank you very much for your support.


Log in to reply
 

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