Ember CLI project crashes when I change CSS file. Am I missing something? - ember-cli

I'm pretty new to Ember but have used Ember CLI to create a project and am on my way. Lots to learn but I'm very impressed so far.
Anyway, my understanding is that Ember CLI projects use broccoli's file-watching features to create a "continuous development" environment. I've seen it in action: as I change templates or javascript files, my changes are immediately apparent when I switch back to the browser.
But when I make changes to css files, my app crashes. Console output is below. Note that when I restart the app with ember server, everything works as exepected. So this isn't some CSS syntax error or the like.
So ... this sure seems like a bug to me, but I'm so new around here that I'm wondering if I'm just missing something very basic.
We're not talking SASS files, either. I'm getting this error if I change a single character in a very small /app/styles/app.css - the one generated by ember new. I've also tried moving the style rule to a file called my.css and leaving app.css empty except for this one line: #import 'my.css'; No love.
Can anyone help? Thanks in advance,
-Billy B
D:\BitBucket\dispatch-alert\node_modules\ember-cli\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:246
Object.keys(this.dirRegistery[dir]).forEach(function(file, i, arr) {
^
TypeError: Object.keys called on non-object
at Function.keys (native)
at Watcher.detectChangedFile (D:\BitBucket\dispatch-alert\node_modules\ember
-cli\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:246:10)
at Watcher.normalizeChange (D:\BitBucket\dispatch-alert\node_modules\ember-c
li\node_modules\broccoli-sane-watcher\node_modules\sane\index.js:280:10)
at FSWatcher.EventEmitter.emit (events.js:98:17)
at FSEvent.FSWatcher._handle.onchange (fs.js:1039:12)
Update:
Based on the help I've gotten so far (thank you guys) and poking around a bit, I have a theory: because I can edit files in other directories and other editors just fine, I conclude that app/styles is just plain not in the list of "watched" directories. This could be a simple error of omission, but I"m wondering if it isn't deliberate. Wouldn't this directory be one that is processed by Compass and other CSS preprocessors, which might have their own file watching systems or otherwise have problems with watched files? Perhaps the makers of ember-cli have deliberately omitted this directory?
How do I find this out? And what should I do? Head over to the ember-cli project and ask for assistance there? I tried to find where a list of watched directories might be kept, but have so far been unsuccessful.

A workaround for the moment is to alter the index.js in line 246 (according in your error and my error messages) in the sane module and add something like this:
if (!this.dirRegistery[dir]){
console.log('error',' empty/unkown dir',dir);
callback();
return;
}
No idea if this is is valid fix. Somehow this is related to sublime. (Caching, File-lock?)..

Related

Swiss QR Bill --> Output fpdf

I've been trying to get the whole Swiss QR up and running for months now. Unfortunately, you can't get help anywhere and it's also getting frustrating.
Finally, I would like to call up a PHP file and have a ready payment slip. with the correct information from the customer.
The SwissQR bill and FPDF were installed via the Composer (but would be happier without Composer, if there is someone here who shows me which files I have to copy I would be happier). and now? none of the "example" files work. Outputs like:
Uncaught Error: Class "Fpdf\Fpdf" not found
or
Class "QrBill\PaymentPart\Output\FpdfOutput\FpdfOutput" not found
are generated.
can someone help me?
everything should be easier, but it seems everything is only getting harder. More complicated, more cumbersome.
Thanks

MagnificPopup won´t work with Typo3

I would like to use magnific popup for a site which is still in development, but unfortunately nothing happens after the installation and adding the static content in my template.
No matter what i try no popup comes up.
If someone would like to help me i will provide access to the site.
Thanks a lot!
First thing to do:
look at your source code: does the 'link' show any sign of 'magnific popup' code?
Added classes? id?
Second: do you see any extra javascript and/or stylesheet that is added by the extension?
If you answer negative to 1 of these, the extension does not output anything. Sounds logic, but it is the first step. Is it a solution? Nope, it means your live just got a bit more worse, but hang in there !
If it does show any code from the ext: look at your console, are there any js errors occurred ? (if you don't know what console is, or (even worse) you work with IE) please read about chrome console of at least install Firefox with firebug.
My best beth would be a JS error...
Can it be possible that the ext itself does not work?
Does your php error logs tell you that the extension is behaving badly?
Do you see errors in the typoscript analyser (or whatever it's called to analyse the css_styled_content and other TS spaghetti )
If not, then no, it is not the ext.
Again, i'm betting my wive, three horses and a barrel of beer on JS erros.
Good luck mate !
ps: IF i'm wrong, i'm not sending you my wife by postal service. Loads of trouble last time. Nor the horses, same shizzle ..

Dynamically loaded javascript doesn't show in sources panel?

For example, I have an ajax request and it returns <script src='buggy.js'></script>.
Problem is, it doesn't show up in sources or resources panel. That means I can't do all the cool stuffs like adding breakpoint and inspecting the elements as they run.
I could only see the source of the js file under the Network panel.
Is there anyway to make chrome add them to the sources panel?
Or how do you guys go about debugging dynamically added scripts?
Using Canary.
I was having the same problem, and I found a workaround that is better than the deliberate exception. It does still require changing the code as opposed to just setting a breakpoint inside the chrome dev tools.
I tried using the "//# sourceURL=dynamicScript.js" that was suggested as a workaround by the OP, but it still wasn't showing up for me unless it already existed in my tabs from a previous time when it produced an exception.
Coding a "debugger;" line forced it to break at that location. Then once it was in my tabs in the Sources panel, I could set breakpoints like normal and remove the "debugger;" line.
Please refer to https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript
(Original link is broken-- archived link below)
http://web.archive.org/web/20141016164821/https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript ("Breakpoints in Dynamic JavaScript").

unable to create new static Library out of existing source code

I'v done quite a bit of R&D on creating static libraries in iOS and came across some well written blogs. I followed this link and also this to create a static library. I have follwed the steps specified in those blogs i.e, i added all the implementation files(.m) to the static library and deleted them from the main target etc... But, i am getting around 700 erros (which is quite bizarre) when i try to build the code. i am posting a screenshot of my errors here..
Is there anything that i am missing here or doing wrong?
Please check the imported Header files.
The .m files, which have these errors, may have the same imported files.
Maybe a semi-comma or parentheses is missing or used incorrectly.

Using GWT + Twitter4j

I am trying to build a simple gwt project that fetches tweets and displays them.The server passes back the tweets of type twitter4j.Tweet to the client.
Both modules import twitter4j.Tweet.
But when I run I get the following error:
--- ERROR: Line 37: No source code is available for type twitter4j.Tweet; did you forget to inherit a required module?.
I seem to have problems in inheriting twitter4j. All the posts I have seen about inheriting a jar file are not clear about how to do so. I understand I must write an inheritance instruction into gwt.xml file, something like
---
but if I try
---
it does not work. Can anyone please explain?
In a post I found on the Web one person suggested not to inherit it but:
-- Don't put twitter4j to your gwt.xml. Just add it your project class path. and make all functionalities like status updating and all in your serviceImpl. Try
This confuses me even more. I have added the jar file to my project libraries. But it does not work
I suspect I am missing something quite elementary here, but I am totally stuck. Is there something like a GWT path?
Many thanks for any help
Keep in mind that everything in your client package is compiled to JavaScript and executed in the user's browser. Thus, you'll only be able to use twitter4j's classes on the server-side of your application; you'll have to create some sort of light-weight GWT-serializable "proxy object" to pass data back and forth between your client and server tiers.
Since you can't use twitter4j on the client side of your app, you will not need anything in your .gwt.xml file referencing it. Instead, you'll add twitter4j to your classpath and do all your updating on the server side (as mentioned toward the bottom of your question). You do mention that it "does not work," but there's not enough information in your question to try to figure out why.