Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contant no such file or directory #20

Open
suederade opened this issue Nov 30, 2015 · 7 comments
Open

Contant no such file or directory #20

suederade opened this issue Nov 30, 2015 · 7 comments

Comments

@suederade
Copy link

var delConfig = [].concat(config.build + '**/*', config.temp);
return gulp.src(delConfig, {read: false})
    .pipe($.clean());

config.build = ./build/
config.temp = ./src/client/.tmp/

Before I changed config.build + '**/* from config.build it just kept hitting my html views and giving me a no such file error and now it just does it on random files.

@suederade
Copy link
Author

Missed a .*

@suederade
Copy link
Author

Need it to clean out the entire folder, so that doesn't work and I have to run gulp-clean twice to make it work.

@suederade suederade reopened this Nov 30, 2015
@gucong3000
Copy link

events.js:141
throw er; // Unhandled 'error' event
^

Error: ENOENT: no such file or directory, lstat '/root/.jenkins/jobs/sdist/workspace/build_act-online_1464000756822/img/4/40762a726aa1e118.png'
at Error (native)

@gucong3000
Copy link

If a file not found, it will throw a js Error

@MrSpark2591
Copy link

this might help
`var fs = require('fs');
var clean = require('gulp-clean');
function checkDirectorySync(directory) {
try {
fs.statSync(directory);
} catch(e) {
fs.mkdirSync(directory);
}
}

gulp.task('cleanProduction', function () {
checkDirectorySync('./production/');
return gulp.src('production')
.pipe(clean({force: true}))
});`

@Gpia
Copy link

Gpia commented Jul 27, 2016

I also found this problem.

@marklabenski
Copy link

marklabenski commented May 15, 2017

The problem seems to be with using glob patterns on clean.
If you remove the glob extension:

var delConfig = [].concat(config.build, config.temp);
return gulp.src(delConfig, {read: false})
    .pipe($.clean());

it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants