You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.
This may be a non-issue and may have more to do with me being a Thorax newbie, but...
I try "thorax view hello_world myview" and get the following error:
myapp% thorax view hello_world myview
created view: js/views/myview.js
created template: templates/myview.handlebars
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot call method 'push' of undefined
at [object Object].view (/usr/local/lib/node_modules/thorax/lib/cli.js:358:52)
at Object.<anonymous> (/usr/local/lib/node_modules/thorax/lib/cli.js:231:20)
at Object.<anonymous> (/usr/local/lib/node_modules/thorax/lib/cli.js:170:41)
at Object.<anonymous> (/usr/local/lib/node_modules/thorax/bin/thorax:14:28)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
My initial thought was that it was because the module name has an underbar in it, but I was able to create another module with an underbar in it and add a view with no problems.
The text was updated successfully, but these errors were encountered:
FWIW, I realize this is also probably a special case, as no real application would ever even keep the "hello_world" module, much less add views to it. But in the context of self-education and tutorials one might do this...and that error can be somewhat jarring for a newbie.
It seems this is because the canned "hello_world" module doesn't have a "files" collection to add the view script to. I manually added an empty "files" collection to that module in lumbar.json and tried again...it worked.
Which brings up another question: Why are the views and routers in the "scripts" collection for "hello_world" (which makes sense to me), but the thorax views command adds them to the "files" collection (which makes less sense to me). Why not put them in "scripts" instead of "files"? Not only would that make more sense, it would also fix the original problem I described.
Looks like I wrote the command line utils before the lumbar.json format came to be in it's present format. Updating those now and should have a fix out later today. Thanks for reporting this.
This may be a non-issue and may have more to do with me being a Thorax newbie, but...
I try "thorax view hello_world myview" and get the following error:
My initial thought was that it was because the module name has an underbar in it, but I was able to create another module with an underbar in it and add a view with no problems.
The text was updated successfully, but these errors were encountered: