110
Views
4
Comments
Solved
Problem using JSZip library in OutSystems Reactive application
Question
Application Type
Reactive

I'm using the JSZip library  in a reactive application to generate zip files, however I'm getting the following error during page load:

[ErrorScreen] Module name "stream" has not been loaded yet for context: _. Use require([])
https://requirejs.org/docs/errors.html#notloaded.

I've included the JSZip library's Reactive module implementations.


DownloadZipSampleReactiveApp.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Mayank,

I also had the same observation while implementing it in RWA (didn't checked implementing the same in TWA). 

I did a slight change in the jszip.js file

i.e.  module.exports = require('stream'); // commented this statment

and everything started working as expected.

See this demo screen: JSZip Demo

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

DownloadZipSampleReactiveApp.oml
2021-08-04 12-19-54
Mayank Dharmpurikar

Thank you so much for your assistance, Mr. Benjith; I almost spent more than 4 hours on this yesterday, but bad luck. You salvaged the day for me. Thank you one more time.


2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome Mayank,

Glad to help you :)


Kind regards,

Benjith Sam

2021-08-04 12-19-54
Mayank Dharmpurikar

successful implementation of the same JSZip library in a Traditional Application for reference.

DownloadZipSampleWebApp.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Mayank,

I also had the same observation while implementing it in RWA (didn't checked implementing the same in TWA). 

I did a slight change in the jszip.js file

i.e.  module.exports = require('stream'); // commented this statment

and everything started working as expected.

See this demo screen: JSZip Demo

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

DownloadZipSampleReactiveApp.oml
2021-08-04 12-19-54
Mayank Dharmpurikar

Thank you so much for your assistance, Mr. Benjith; I almost spent more than 4 hours on this yesterday, but bad luck. You salvaged the day for me. Thank you one more time.


2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome Mayank,

Glad to help you :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.