1

I'm currently trying to update our boilerplate for web apps and its build tools.

I'm getting this error currently:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Broken @import declaration of "branding", Broken @import declaration of "helper", Broken @import declaration of "routing"

I'm assuming it is some kind of caching problem because the .scss file it's supposed to parse is empty. The project with files like branding and routing is a different one and I'm definitely not in the wrong folder in the terminal.

How could I fix this? Can I / Should I clear the cache? How?

For completion: Gulpfile Styles Task:

// Styles
gulp.task('styles', function() {
  return sass('src/css/app.scss', { 
      sourcemap: true,
      noCache: true
  })
    .on('error', function (err) {
      console.error('Error', err.message);
    })
    .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('dist/css'))
    .pipe(notify({ message: 'Styles task complete' }));
});

Package.json

{
  "name": "boilerplate",
  "version": "1.0.0",
  "description": "Download as ZIP, **don't clone this repo** if you want to create a new project. Only clone if you want to update/change the boilerplate.",
  "main": "gulpfile.js",
  "dependencies": {
    "bower": "^1.3.12",
    "del": "^1.1.1",
    "gulp-autoprefixer": "^2.1.0",
    "gulp": "^3.8.11",
    "gulp-concat": "^2.5.1",
    "gulp-minify-css": "^0.4.6",
    "gulp-notify": "^2.2.0",
    "gulp-rename": "^1.2.0",
    "gulp-jshint": "^1.9.2",
    "gulp-ruby-sass": "^1.0.0",
    "gulp-uglify": "^1.1.0",
    "main-bower-files": "git://github.com/ck86/main-bower-files"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://codeofsumit:091210sk@github.com/codeofsumit/boilerplate.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/codeofsumit/boilerplate/issues"
  },
  "homepage": "https://github.com/codeofsumit/boilerplate"
}
ProblemsOfSumit
  • 19,543
  • 9
  • 50
  • 61
  • I checked out your project at https://github.com/codeofsumit/boilerplate/tree/sourcemaps and it compiled perfectly fine. So if it's really a cache problem, try killing the `.sass-cache` directory (it's hidden on some OSs) and run it again. Another way of testing would be a clean checkout in a new folder with a new `npm install` – ddprrt Apr 27 '15 at 12:46
  • @ddprrt do you have any idea where the `.sass-cache` folder is located? I'm on OSX and haven't changed any default setting. – ProblemsOfSumit Apr 27 '15 at 14:08
  • Usually in your project folder, where you call your Gulpfile. Open the terminal and type `ls -la` there, that should show you all contents – ddprrt Apr 27 '15 at 16:12
  • it's not in there :( – ProblemsOfSumit Apr 28 '15 at 07:21
  • have you tried a clean checkout from your source repo? Does the same error occur then? – ddprrt Apr 28 '15 at 08:47
  • I've run into this same problem with a very similar gulp task. I got rid of `.pipe(rename({ suffix: '.min' })).pipe(minifyCss()).pipe(gulp.dest(paths.css))` and it started to work. Added the minification back and it instantly broke again. Did you ever find a solution to your problem? – Adaline Simonian May 10 '15 at 01:19
  • @VartanSimonian no not yet :( – ProblemsOfSumit May 10 '15 at 14:13

0 Answers0