marko-js-samples / ui-components-playground-lasso-express

Sample app that demonstrates the power of building UI components using Marko
https://ui-components-playground.herokuapp.com/
26 stars 13 forks source link

Error rendering widgets on Windows #4

Closed xaricx closed 7 years ago

xaricx commented 7 years ago

On a Windows machine, even after ensuring npm install and npm install marko@latest-beta and npm install lasso@latest-beta, when rendering the first component (app-button), the following error is displayed:

Error: Invalid include target: small
   at include (c:\code\ui-components-playground\node_modules\marko\taglibs\core\include-tag.js:17:19)
   at render (c:\code\ui-components-playground\src\components\app-button\index.marko.js:33:3)
   at renderer (c:\code\ui-components-playground\node_modules\marko\widgets\renderer.js:273:9)
   at Object.renderBody (c:\code\ui-components-playground\src\components\app\index.marko.js:51:15)
   at include (c:\code\ui-components-playground\node_modules\marko\taglibs\core\include-tag.js:10:24)
   at c:\code\ui-components-playground\src\components\app-sections\index.marko.js:40:5
   at forEachHelper (c:\code\ui-components-playground\node_modules\marko\runtime\helpers.js:93:13)
   at render (c:\code\ui-components-playground\src\components\app-sections\index.marko.js:33:3)
   at render (c:\code\ui-components-playground\src\components\app\index.marko.js:44:3)
   at renderer (c:\code\ui-components-playground\node_modules\marko\widgets\renderer.js:273:9)

I thought it might be an issue with Windows referencing "~" properly, so I manually replaced that with the relative path, but this did not resolve the issue.

Thoughts?

austinkelleher commented 7 years ago

Don't use latest-beta for Lasso as it points to Lasso 2.5.0-beta.1, which is very out of date. Everything should work if you use the Lasso that is already listed as a dependency in the package.json, and install the Marko latest beta, which points to the release candidate version marko@4.0.0-rc.0.

xaricx commented 7 years ago

I've tested this on 2 fresh VMs: Elementary OS, and Windows 10.

No modifications to source. Git clone, npm install and node server.js.

Elementary OS works. Windows 10, same error as above. (The windows machine is running node 4.3.x to match AWS... if that makes a difference. However, my other main Windows development VM runs 6.9.x).

xaricx commented 7 years ago

Confirmed on yet another Windows 10 VM running node 6.9.1.

patrick-steele-idem commented 7 years ago

Thanks for reporting the problem @xaricx. We definitely want to get down to the bottom of this. I don't have a working Windows VM at the moment. Would it be possible for you to tar/zip the src directory on your Windows VM and share it by adding it to a Github comment? I want to verify that the template compiled directly on a Windows machine (file system differences can cause issues when working with paths). Thank you!

xaricx commented 7 years ago

ui-components-playground.zip

xaricx commented 7 years ago

I also suspected paths ... and hence tried switching all ~ to relative (../../) paths.

patrick-steele-idem commented 7 years ago

@xaricx Thank you for sharing the zip file (very helpful). It looks like there are some issues related to whitespace normalization that's causing some issues on Windows. Most likely due to not handling a Windows EOL sequence (i.e. \r\n) correctly. I'll continue to investigate and should have a fix soon. Thanks, again.

patrick-steele-idem commented 7 years ago

This has been fixed with the latest version: marko@4.0.0-rc.3

Please let us know if you still see issues. Thanks.