borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

TypeError in node 6.9.0 #61

Closed mmase closed 8 years ago

mmase commented 8 years ago

postcss-assets doesn't work with a simple gulp setup on 6.9.0:

return gulp.src( [__dirname + '/assets/sass/**/*.scss'] )
    .pipe(
      postcss([
        assets(),
        reporter({
          clearMessages: true,
          throwError: true
        })
      ],
      { syntax: syntax })
    )
    .pipe(
      sass({
        includePaths: __dirname + '/assets/sass',
        errLogToConsole: true
      })
    )
    .pipe(
      postcss([
        autoprefixer({ browsers: ['last 2 versions', 'ie > 10'] })
      ])
    )
    .pipe(gulp.dest(__dirname + '/public/assets/css'));

Errors out with assets()

events.js:160
      throw er; // Unhandled 'error' event
      ^
TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at /Users/mase/Code/be.net/node_modules/assets/lib/path.js:30:23
    at Array.map (native)
    at /Users/mase/Code/be.net/node_modules/assets/lib/path.js:29:29
    at tryCatcher (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/promise.js:636:18)
    at /Users/mase/Code/be.net/node_modules/assets/node_modules/bluebird/js/release/nodeback.js:42:21
    at f (/Users/mase/Code/be.net/node_modules/once/once.js:25:25)
    at Glob.<anonymous> (/Users/mase/Code/be.net/node_modules/glob/glob.js:146:7)
    at emitOne (events.js:96:13)
    at Glob.emit (events.js:188:7)
    at Glob._finish (/Users/mase/Code/be.net/node_modules/glob/glob.js:185:8)
    at done (/Users/mase/Code/be.net/node_modules/glob/glob.js:172:12)
    at Glob._processSimple2 (/Users/mase/Code/be.net/node_modules/glob/glob.js:683:3)
    at /Users/mase/Code/be.net/node_modules/glob/glob.js:653:10
    at Glob._stat2 (/Users/mase/Code/be.net/node_modules/glob/glob.js:764:10)
    at lstatcb_ (/Users/mase/Code/be.net/node_modules/glob/glob.js:741:12)
    at RES (/Users/mase/Code/be.net/node_modules/inflight/inflight.js:31:16)
    at f (/Users/mase/Code/be.net/node_modules/once/once.js:25:25)
    at FSReqWrap.oncomplete (fs.js:123:15)
mmase commented 8 years ago

closing this, was an issue with sass variables, not related!