-
Notifications
You must be signed in to change notification settings - Fork 305
Error: Module build failed: Error: Final loader didn't return a Buffer or String #466
Comments
I confirm that issue as well. |
I've downgraded to 0.0.44 - seems to have fixed the issue for now. |
Any idea how to recreate the issue? Thanks, |
@danbucholtz sorry, I don't know. All I know, is it happens sporadically on 0.0.45 and 0.0.46. I haven't seen this issue crop up since I downgraded to 0.0.44. I'm afraid that I can't share the source code with you as it is private. |
@danbucholtz It seems, that it happens when I change the ts file (that starts transpile etc) and just right after I change the same ts file again:
Look, that build started two times, transpile started two times, webpack started two times as well, but finished only once. But it doesn't happen all the time, probably the second change must be made in appropriate time and generates race condition... |
Hmmm, okay, I will try to break it and fix it. Thanks @lleevvyy! Thanks, |
An update to this. I put some debug logging inside the module which throws the error, if(!Buffer.isBuffer(source) && typeof source !== "string") {
console.log(result);
return callback(module.error = new ModuleBuildError(module, new Error("Final loader didn't return a Buffer or String")));
} It's happened to me a couple of times again today. Here is the result of the console logging:
This is the contents of // Import just the rxjs statics and operators needed for THIS app.
// Statics
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/observable/of';
import 'rxjs/add/observable/zip';
// Operators
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/startWith';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/takeWhile'; I import this in my // Add the RxJS Observable operators.
import './app.operators'; Maybe this is of some help? |
Good morning, I was thinking it happens, on my end, because I use 'ng-bootstrap modal' and add it 'entryComponent' but now I experience even without 'ng-bootstrap modal'. Thank you. |
Can confirm. It's horrible because it constantly breaks development. @ionic/app-scripts 0.0.46 |
Anyone know how to recreate? I cannot recreate it. I will fix if someone can give steps to reproduce it. Thanks, |
I can reproduce this! I start my app using ionic serve -b
the error persist if i save a .ts but if i save a .html again, the error disappears, Ionic Framework: ^2.0.0-rc.3 |
I'll check it out, thanks @gust42! Thanks, |
Sorry, those steps don't work for me. I just tried them out. I have never once seen this issue in developing on Mac or Windows 10. Are you using Do you get the issue if you set Thanks, |
Yes we are using barrels, they make imports so much more elegant but i guess we have to refactor them away. Latest nightly with new webpack seems to remove Final Loader issue, but now it hangs when saving a .html 2 times in a row, without any .ts changes, for some reason it does a full transpile the second time saving the template. Saving a .ts start a new full transpile where webpack update succeeds Edit: Made a pull request for the new error #557 |
I suddenly ran into the same issue, to the point where
|
Literally 5 mins after I wrote this, the error happened again. |
I've also noticed that there might be some correlation with this happening when saving the HTML template files. Just now, when saving both the ts and corresponding HTML template file at the same time (using my editor's 'Save All' command), I see the error. I've also noticed an error whereby if I save a HTML file, wait for the app to reload, then make a change to the corresponding ts file, save again, the old version of the HTML file reloads in the browser. I recall a separate issue regarding this but I can't currently find it, but I wonder if this is also part of the issue. |
I'll do some more testing around this tonight. Thanks, |
Highly appreciated, thanks @danbucholtz! |
@fiznool, what are the details on your system. What node version, OS, etc. I am going to add some additional logging, etc to the loader so we can hopefully track this down. I doubt the CLI has anything to do with this. All of the watching, etc happens in app-scripts. If anyone can recreate a repo and provide steps to do it, I can and will most certainly fix it or raise the flag that we need a major change to fix it. Thanks, |
Thanks, my OS is Ubuntu 16.10, node version 6.7.9. |
@danbucholtz: Sure:
|
OS is ubuntu 16.04 LTS, to be more specific. |
Oh, and - as you may have figured out yourself - Browser is Chromium
but I've seen the same behavior on Chrome for Windows, connecting remotely (hence the |
Daamn, just started to expirience the same ...
What I noticed: if I change .html -- it starts to work again, if I change .ts -- it dropping that issue :( |
Just downgraded ionic-cli to 2.1.15 with |
It seems highly unlikely that it's related to the Ionic CLI. It would be better to use Thanks, |
Dunno, @tkem said the same here #466 (comment) and downgrade helped to me. Also thanks for fixing #533, will try it later. |
Please keep trying to recreate with the newest CLI. How often does this happen? Every time you develop with Ionic after a few saves? first save? Randomly once every few days? I added a bunch of logging and unit tests to the code here that will be released in Thanks, |
@danbucholtz sorry, I need to deploy things to Production today so need stability and can't switch to latest for now. "How often does this happen? Every time you develop with Ionic after a few saves? first save? Randomly once every few days?" -- can't say for 100%, but it starts right after |
Hi all, I added a ton of logging in Thanks, |
have done a couple of hours of development today without seeing the final loader thingy on 0.0.48 Edit: Before i was seeing it all the time |
w00t! Is anyone else still seeing this issue? Thanks, |
Unfortunately I've been unable to test at all with 0.0.48 due to #590 |
Good afternoon. |
@danbucholtz: Haven't seen this in two hours of intensive editing with v0.0.48 and
for v0.0.48 to work at all for me, as detailed in #562. |
@danbucholtz I think I found out when this issue occurs. I don't have logging enabled, but could upgrade to enable it as I am on 0.0.47 right now. Here is how to recreate this issue Save a HTML file -> while its building save its corresponding TS file Edit: I see that @gust42 already found this out, sorry! |
I'll check it out @realappie. Thanks! Maybe we need to queue up builds if there is an active build running. Hmmm. Thanks, |
I've been running 0.0.48 for the past 2 days, I've saved my project's files
hundreds of times and this issue hasn't occurred at all. So from my point
of view, it can be considered resolved.
|
Can anyone recreate this issue with Thanks, |
@danbucholtz I cannot recreate it with 0.0.48, so if you would ask me I would close the issue for now. |
@danbucholtz: Haven't seen this in quite some time either, so maybe time to fry the "smaller fish" (#562)... |
I'm going to close this for now, but I will reopen if we see a recreation. Thanks, |
Short description of the problem:
When using
ionic serve
, sometimes I get the error:I have to restart
ionic serve
to make the error go away.Which @ionic/app-scripts version are you using?
0.0.46
Other information:
Here's a screenshot of the issue:
The text was updated successfully, but these errors were encountered: