1

I'm having an issue with path on windows. On OSX it works just fine.

Here is my task:

gulp.task('build:less', function () {
    return gulp.src('./src/less/style.less', {base: './src/less'})
        .pipe(less({
            paths: [path.join(__dirname, 'less', 'includes')]
        }))
        .pipe(rename(pkg.css))
        .pipe(gulp.dest('./build/assets/'));
});

./src/less/style.css contents

@import "../../vendor/bootstrap/less/bootstrap";
@import "../../vendor/bootstrap/less/glyphicons";
@import "../../vendor/font-awesome/less/font-awesome";
@import "../../vendor/material-design-iconic-font/less/material-design-iconic-font";
@import "../../vendor/bootstrap-select/less/bootstrap-select";
@import "../../vendor/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox";

@import "variables";
@import "navbar";

Error message

C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0>call gulp build:less
[18:28:34] Using gulpfile           C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\gulpfile.js
[18:28:34] Starting 'build:less'...

C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\node_modules\gulp-less\node_modules\accord\node_modules\when\lib\decorators\unhandledRejection.js:80
            throw e;
                  ^
Error: '../../vendor/bootstrap/less/bootstrap.less' wasn't found. Tried -     C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\vendor\bootstrap\less\bootstrap.less    ,C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\vendor\bootstrap\less\bootstrap.less,..\..\vendor\bootstrap\less\bootstrap.less in file     C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\src\less\style.less line no. 1
Diego Vieira
  • 1,150
  • 2
  • 13
  • 31
  • Where is your `/vendor/` folder? Make sure it exits in `C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\` and contains `bootstrap/less/*` – Bass Jobsen Apr 20 '15 at 22:12
  • @BassJobsen vendor is two levels above the less dir. The strange thing is that on Mac it works just fine, the problem is when I copy the files to windows. – Diego Vieira Apr 20 '15 at 23:42
  • But have you verified that it exists in that `C:\TeamCity\buildAgent\work\f6d8e60b97f3ac0\vendor\bootstrap\less\bootstrap.less` exists on your TeamCity server, and that it has been committed to source control? – Jay Harris Apr 21 '15 at 19:29
  • @JayHarris yeah it does, that's the strange part. – Diego Vieira Apr 21 '15 at 20:11
  • Are the Bootstrap files committed, or do they come down with a package manager like Bower? – Jay Harris Apr 23 '15 at 00:18
  • from bower, but they really does exist on the path because we run bower install before the build, thank you – Diego Vieira Apr 23 '15 at 04:14

0 Answers0