Error when loading fs-store@3.1.0 in jsreport 3.3.0 and 3.4.0



  • After building the image and starting my container everything is working fine.

    I then wanted to mount my jsreport so my changes reflect direclty to the vscode and vise verse.

    here is the command: ./dev-mnt-jsreport.sh

    As soon as I ran this command I started having the error below:

    2022-02-11T21:33:14.400Z - error: Error occurred during reporter init: Error: Error when loading extension fs-store@3.1.0

    Error: EACCES: permission denied, mkdir '/data/storage'

    at Object.mkdirSync (node:fs:1334:3)
    
    at module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/blobStorageProvider.js:8:8)
    
    at Object.module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/main.js:37:75)
    
    at Object._useOne (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:226:75)
    
    at Object._useMany (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:99:38)
    
    at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:199:7)
    
    at Object._useOne (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:248:15)
    
    at Object._useMany (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:99:38)
    
    at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:199:7)
    

    Error: Error when loading extension fs-store@3.1.0

    Error: EACCES: permission denied, mkdir '/data/storage'

    at Object.mkdirSync (node:fs:1334:3)
    
    at module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/blobStorageProvider.js:8:8)
    
    at Object.module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/main.js:37:75)
    
    at Object._useOne (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:226:75)
    
    at Object._useMany (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:99:38)
    
    at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:199:7)
    
    at Object._useOne (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:248:15)
    
    at Object._useMany (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:99:38)
    
    at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:199:7)
    

    And the container keeps restarting.

    I know it has to do with permission but since i am new I am a bit confused.

    I am using WSL2

    Thanks for your help.



  • Hi,

    Are you running jsreport directly in WSL2 or with docker/podman?
    I had a similar problem with a rootless podman installation, and therefore changed to a simple docker solution. Then I was able to mount the automated mounted folders in WSL "/mnt/c/..." to my docker container and enable the direct synchronization.

    Docker in WSL
    https://dev.to/bowmanjd/install-docker-on-windows-wsl-without-docker-desktop-34m9

    Docker Command
    docker run -e "licenseKey=$LICENSE_KEY" -p 5488:5488 -v /mnt/c/.../templates:/opt/jsreport/data jsreport/jsreport



  • @ThomasJReiter Thank you very much for your response. I am running jsreport in docker.

    I am gonna try your approach and give a feedback.


Log in to reply
 

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