Comments (5)
var pid = gutil.colors.magenta( app.child.pid );
TypeError: Cannot read property 'pid' of null
from gulp-develop-server.
This issue is most persistent when watching the many results of a js/css set of gulp tasks. For instance, I have several js and css files that need to be minified and linted, which then get moved to a "dist" folder. My develop task is as follows:
gulp.task('watch', ['server:start'], function () {
var notify = function(file) {
server.changed( function( error ) {
if( ! error ) lr.changed( file.path );
});
};
gulp.watch(paths.css, ['sass']);
gulp.watch(paths.html, ['compresshtml']);
gulp.watch(paths.js, ['lint', 'compressjs']);
gulp.watch(['./public/dist/**/*']).on('change', notify);
});
This yields the child pid error as well as several other event errors.
from gulp-develop-server.
I think this issue is caused by a bug of checking multiple restarts.
https://github.com/narirou/gulp-develop-server/blob/master/index.js#L206-L210
// already called this function
if( isChanged ) {
isChanged = false; // *** I think this line cause the problem. It is unnecessary code. ***
return done( null, 'Development server already received restart requests.', callback );
}
It calls the kill
function multiple times when the watcher task calls restart
multiple times in a very short time.
from gulp-develop-server.
@kgdev, @nforysinski, @chimerast
Thank you for the detailed report.
As it is said, the value of isChanged
was incorrect.
This bug made it possible to send a restart request many times.
But, as a result, I do not know whether this issue has been fixed yet.
I plan to verify the reproducibility of this issue, and add more test code.
from gulp-develop-server.
I think this error fixed by previous commit. (thanks @chimerast)
If not, please reopen this issue. Thanks.
from gulp-develop-server.
Related Issues (13)
- Livereload issues HOT 6
- Incorrect interpretation of server error on --debug HOT 2
- server.restart should restart server even when it's down HOT 3
- Run coffee HOT 1
- Colors in console HOT 3
- Expose a method or parameter that tells you if the server is currently running HOT 2
- server restarts on change in logs/
- Change current working directory HOT 1
- Server stops immediately HOT 2
- Include current environment variables for child processess HOT 3
- Arguments to the script HOT 7
- Pipe output to bunyan cli HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-develop-server.