GithubHelp home page GithubHelp logo

Comments (7)

TrySound avatar TrySound commented on May 26, 2024

@IlianYotov For now import are not ready for new API. Try to use gulp-postcss@5

from gulp-postcss.

yotov avatar yotov commented on May 26, 2024

Thank you. It's works with version 5.1.10

from gulp-postcss.

dhruvbhatia avatar dhruvbhatia commented on May 26, 2024

👍 Thanks

from gulp-postcss.

TrySound avatar TrySound commented on May 26, 2024

@IlianYotov @dhruvbhatia The last verson of postcss-import now works with the last gulp-postcss.

from gulp-postcss.

jamesscholeyweb avatar jamesscholeyweb commented on May 26, 2024

What's the status of this. I too have rolled back to 5.1.10 to allow imports to work?

from gulp-postcss.

w0rm avatar w0rm commented on May 26, 2024

this isn't the issue of gulp-postcss, the latest version simply bumps the version of postcss, some plugins might not be up to date with it yet.

from gulp-postcss.

andyfen avatar andyfen commented on May 26, 2024

are imports woking now ?

gulp.task('styles', () => {
  var processors = [
    require("postcss-cssnext")(),
    postcssNormalize,
    require('lost'),
    require('postcss-nested'),
    require("postcss-import")(),
  ];
  return gulp.src(input.styles)
    .pipe(sourcemaps.init())
    .pipe(plumber())
    .pipe($.postcss(processors))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(output.styles))
    .pipe(browserSync.stream());
});

@import './test.css';

getting this error

[12:27:08] Starting 'styles'...
[12:27:08] Plumber found unhandled error:
TypeError in plugin 'gulp-postcss'
Message:
Cannot read property 'length' of undefined
Details:
fileName: /Users/user/Documents/projects/koa-starter/app/styles/main.css
Stack:
TypeError: Cannot read property 'length' of undefined
at module.exports (/Users/user/Documents/projects/koa-starter/node_modules/postcss-import/lib/join-media.js:2:40)
at /Users/user/Documents/projects/koa-starter/node_modules/postcss-import/index.js:167:18
at Array.map (native)
at parseStyles (/Users/user/Documents/projects/koa-starter/node_modules/postcss-import/index.js:166:33)
at /Users/user/Documents/projects/koa-starter/node_modules/postcss-import/index.js:48:12
at LazyResult.run (/source/lazy-result.es6:321:20)
at /source/lazy-result.es6:248:32
at LazyResult.asyncTick (/source/lazy-result.es6:246:13)
at /source/lazy-result.es6:260:22
at LazyResult.asyncTick (/source/lazy-result.es6:246:13)
at /source/lazy-result.es6:260:22
at LazyResult.asyncTick (/source/lazy-result.es6:246:13)
at /source/lazy-result.es6:253:26
at tryCatch (/Users/user/Documents/projects/koa-starter/node_modules/es6-promise/dist/lib/es6-promise/-internal.js:195:12)
at invokeCallback (/Users/user/Documents/projects/koa-starter/node_modules/es6-promise/dist/lib/es6-promise/-internal.js:210:13)
at publish (/Users/user/Documents/projects/koa-starter/node_modules/es6-promise/dist/lib/es6-promise/-internal.js:178:7)

from gulp-postcss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.