marko-js-archive / marko-widgets

[LEGACY] Module to support binding of behavior to rendered UI components rendered on the server or client
http://v3.markojs.com/docs/marko-widgets/
MIT License
141 stars 40 forks source link

Scoped packages break client runtime #114

Closed tropperstyle closed 8 years ago

tropperstyle commented 8 years ago

I have a widget in a standalone repository. It has a marko-taglib.json, a renderer, and a widget.js file for w-bind

Everything works as long as the package name does not contain a scope. If it contains a scope, the following error is thrown in the browser at run time:

Error: Cannot find module "/$/@scope/package-name/widget" from "/$/marko-widgets/lib"

patrick-steele-idem commented 8 years ago

Ok. That does look like a bug. I'll need to investigate to see what needs to change to support scoped packages. Thanks for opening the issue.

patrick-steele-idem commented 8 years ago

Fixed in raptor-modules: https://github.com/raptorjs/raptor-modules/issues/15

Please let me know how things go after a fresh npm install and also deleting the .cache/ directory in the root of your project. Please confirm if this fixes your problem so that I can close the issue. Thanks!

tropperstyle commented 8 years ago

Hmm I cleared out node_modules and .cache, confirmed raptor-modules@1.2.0 was installed upon refresh, but I am still running into that same error.

patrick-steele-idem commented 8 years ago

Let me see if I can reproduce. I just focused on adding unit tests to support scoped packages, but I have not tested in a real app.

patrick-steele-idem commented 8 years ago

Hey @tropperstyle, I was able to reproduce in a real app. I'm investigating the issue. Thanks for your patience.

patrick-steele-idem commented 8 years ago

@tropperstyle I found the issue. I should have a fix soon.

patrick-steele-idem commented 8 years ago

Hey @tropperstyle. An additional fix was required: https://github.com/raptorjs/raptor-modules/commit/958ce4658688e95c1c858bf6a4617323b134fe84

I tested locally in a real app and was able to reproduce and things are working as expected with the latest version of raptor-modules: raptor-modules@1.2.1

Please test again with a fresh npm install and after deleting the .cache/ directory. Please let me know if this resolves your problem. Thanks!

tropperstyle commented 8 years ago

Problem resolved. Much appreciated!

patrick-steele-idem commented 8 years ago

Great. Thanks again.