When i run the gulp task i am getting error like this, it is probably related with this line .pipe($.autoprefixer({browser:['last 2 version','> 5%']}))
when i exclude this line it works well.
Could you help me please ?
Potentially unhandled rejection [2] Error: write callback called multiple times
gulp.task('styles',function (done){
//return
gulp.src(config.less)
.pipe($.less())
.pipe($.autoprefixer({browser:['last 2 version','> 5%']}))
.pipe(gulp.dest(config.temp));
done();
});
Related
We are migration angular.min.js v1.3.0 js to angular.min.js v1.6.9.So we are getting following error message Please suggestion any solution.Thanks
::Error Block::
angular.min.js:122 Error: [$rootScope:infdig] http://errors.angularjs.org/1.6.9/$rootScope/infdig?p0=10&p1=%5B%5D
at angular.min.js:6
at m.$digest (angular.min.js:145)
at m.$apply (angular.min.js:147)
at l (angular.min.js:101)
at XMLHttpRequest.N.onload (angular.min.js:106)
We tried different approach to resolve digest cycle issue
https://code.angularjs.org/1.6.0/docs/api/ng/provider/$rootScopeProvider
https://docs.angularjs.org/api/ng/provider/$rootScopeProvider
https://code.angularjs.org/1.6.0/docs/error/$rootScope/infdig?p0=10&p1=%5B%5D
https://code.angularjs.org/1.7.8/docs/guide/migration#migrating-from-1-3-to-1-4
Please suggestion any solution.
This error occurs when the application's model becomes unstable and each $digest cycle triggers a state change and subsequent $digest cycle. AngularJS detects this situation and prevents an infinite loop from causing the browser to become unresponsive.
One common mistake is binding to a function which generates a new array every time it is called. The solution is to return the same array object if the elements have not changed.1
You will get better error messages if you use angular.js instead of angular.min.js.
its working for me
var MobileApp = angular.module('MobileApp',[ "ngRoute", "mobile-angular-ui",
"mobile-angular-ui.gestures", "angucomplete-alt" , 'ui.tree'], function($rootScopeProvider) {
$rootScopeProvider.digestTtl(20); // 20 being the limit of iterations.
}
);
After updating from laravel 5.3 to 5.4, I encountered an error in vendor. The error is:
Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Session\Store::set() in /var/www/ostadbank.com/vendor/laravel/framework/src/Illuminate/Support/Manager.php:137
But when I go to my error is:
fatal error exception in Manager.php line 137:call to undefined method Illuminate\session\store::set()
I go to manager.php line 137 and I see the line below:
public function __call($method, $parameters) { return $this->driver()->$method(...$parameters); }
I am not sure where to start to modify.
See the screenshots below:
I solve it, for more information read this: https://laravel.com/docs/5.4/upgrade
All calls to the ->set() method should be changed to ->put(). Typically, Laravel applications would never call the set method since it has never been documented within the Laravel documentation. However, it is included here out of caution.
I am wondering where the connection should be released after using it, i have seen couple of options for that:
pool.getConnection(function(err, conn){
//conn.release() // should be placed here (1)?
conn.query(query, function(err, result){
//conn.release() // should be placed here (2)?
if(!err){
//conn.release() // should be placed here (3)?
}
else{
//conn.release() // should be placed here (4)?
}
//conn.release() // should be placed here (5)?
});
//conn.release() // should be placed here (6)?
});
Or maybe should it be released both error and non error cases?
The correct place is either #2 or #5.
You want to release the connection when you are done using it.
#6 would be wrong because query() is asynchronous, so it would return right away before the connection is done with the query and before the callback fires. So you'd be releasing the connection before you are done with it.
#5 is correct because the callback has fired and you have done everything you are going to do with it. Note that this assumes that you do not use return to exit the function before that point. (Some people do that in their if (err) blocks.)
#2 is also correct if you aren't using the connection anywhere inside the callback. If you are using it in the callback, then you don't want to release it before you are done using it.
#3 and #4 are incorrect unless you use both of them. Otherwise, you are only releasing the connection in some situtations.
And #1 is incorrect because you haven't used the connection yet.
function fc () {
var x = 11
var y = x.toString()
return y
}
I execute this in a script file bound to a spreadsheet,
and get a the following error message:
We're sorry, a server error occurred. Please wait a bit and try again.
If I execute that same function in another script file,
it works as expected, without error message.
The same happens with "simply" changing x to string:
var x = "11"
There may be an "easy" explanation but while you are at it, it feels
like living a Gary Larson-Cartoon ...
I just ran that script with no problems. I think I've had that error msg before for something that didn't have anything to do with the server. It's impossible to capture every possible error perfectly. Once in a while you get a misleading error. I'm not saying that definitely is the situation, but just keep it in mind.
You have to go through the debugging process. I've had to comment out large sections of code many times and go back to the beginning to trace errors. Sometimes that's the only way. Start commenting out code until you get something to run without an error, then add lines back in until another failure.
Further to my adventures with Erlang and ErlyDB. I am attempting to get ErlyDB working with BeepBeep
My ErlyDB setup works correctly when run outside of the BeepBeep environment (see Debugging ErlyDB and MySQL). I have basically take the working code and attempted to get it running inside BeepBeep.
I have the following code in my controller:
handle_request("index",[]) ->
erlydb:start(mysql,Database),
erlydb:code_gen(["thing.erl"],mysql),
NewThing = thing:new_with([{name, "name"},{value, "value"}]),
thing:save(NewThing),
{render,"home/index.html",[{data,"Hello World!"}]};
When I call the URL, the response outputs "Server Error".
There is no other error or exception information reported.
I have tried wrapping the call in try/catch to see if there is an underlying error - there is definitely an exception at the call to thing:new_with(), but no further information is available.
The stacktrace reports:
{thing,new,[["name","value"]]}
{home_controller,create,1}
{home_controller,handle_request,3}
{beepbeep,process_request,4}
{test_web,loop,1}
{mochiweb_http,headers,4}
{proc_lib,init_p_do_apply,3}
Use pattern matching to assert that things work up to the call to thing:new/1:
ok = erlydb:start(mysql,Database),
ok = erlydb:code_gen(["thing.erl"],mysql),
You include only the stack trace, look at the exception message as well. I suspect that the error is that you get an 'undef' exception. But check that it is so. The first line in the stack trace indicates that it is a problem with calling thing:new/1 with ["name", "value"] as argument.
It is slightly odd that you show one clause of handle_request that is not calling home_controller:create/1 as per {home_controller,create,1} in the stack-trace. What do the other clauses in your handle_request/2 function look like?