Otherwise on windows, the created combined.js file would be encoded in ANSI, then cause minifyCombined task fails with error:
PS D:\MoquiDemo-3.0.0> .\gradlew run
> Task :runtime:component:PopRestStore:minifyCombined
ERROR - [JSC_READ_ERROR] Cannot read file D:/MoquiDemo-3.0.0/runtime/component/PopRestStore/screen/store/components/combined.js: Failed to read: D:\MoquiDemo-3.0.0\runtime\component\PopRestStore\screen\store\components\combined.js, is this input UTF-8 encoded?
1 error(s), 0 warning(s)
Error: Cannot read file D:/MoquiDemo-3.0.0/runtime/component/PopRestStore/screen/store/components/combined.js: Failed to read: D:\MoquiDemo-3.0.0\runtime\component\PopRestStore\screen\store\components\combined.js, is this input UTF-8 encoded? at line -1:-1
Js Minifier: 1 error(s), 0 warning(s)```
Have a nice day
Thanks for reporting this, the code is similar in 2 places in the build.gradle file for the webroot component (in the moqui-runtime repo). I just pushed changes to PopRestStore and moqui-runtime based on your recommendation. I haven’t tested this on Windows, if you could do that it would be helpful.
I got the same problem too on windows, just following the step:
git clone https://github.com/moqui/moqui-framework.git moqui
cd moqui
gradle getComponentSet -PcomponentSet=demo -PlocationType=release
just open D:\MyProjects\moqui\runtime\component\PopRestStore\screen\store\components\combined.js this file, and change the encoding type to utf-8 and save successlly
then run or load with following commands:
gradle run
or
gradle load
I have tried many times with the two steps, this file’s encoding will always be change to ANSI.