Coder Social home page Coder Social logo

postcss-load-plugins's People

Contributors

ertrzyiks avatar greenkeeper[bot] avatar greenkeeperio-bot avatar michael-ciniawsky avatar scrum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

postcss-load-plugins's Issues

An in-range update of coveralls is breaking the build 🚨

Version 2.11.16 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.11.15
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… coverage/coveralls First build on greenkeeper/coveralls-2.11.16 at 100.0% Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 13 commits .

  • 8dfcfd6 version bump
  • 4bc93ac Merge branch 'master' of github.com:nickmerwin/node-coveralls
  • 671acca removed codeship badge
  • f390392 Merge pull request #152 from ndaidong/master
  • de968b0 Merge pull request #147 from hyperlink/update-request-dep
  • 72a4046 Merge pull request #154 from a0viedo/patch-1
  • 87b27f7 Merge pull request #142 from Hirse/feature/travis-pr
  • 3edbecb Merge pull request #155 from kasperlewau/master
  • d117e3d reenable drone
  • dd230f6 don't hardcode minor version
  • cc0882d Update outdate dependencies
  • 99edf1a Fix node-uuid deprecation by updating request dependency
  • f94b647 Get PR number from TRAVIS

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Getting started with postcss.config.js

This is more of a newbie question than an issue but if you could point me in the right direction I'd appreciate it.

So I've added the plugins to my package.json devDependencies:

"devDependencies": {
    "autoprefixer": "^8.0.0",
    "browser-sync": "^2.18.13",
    "bs-html-injector": "^3.0.3",
    "cssnano": "^4.0.0-rc.2",
    "del": "^3.0.0",
    "gulp": "^3.9.1",
    "gulp-changed": "^3.2.0",
    "gulp-concat": "^2.6.1",
    "gulp-if": "^2.0.2",
    "gulp-newer": "^1.4.0",
    "gulp-notify": "^3.2.0",
    "gulp-nunjucks-render": "^2.2.2",
    "gulp-plumber": "^1.2.0",
    "gulp-postcss": "^7.0.0",
    "gulp-purgecss": "^0.15.0",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^3.1.0",
    "postcss-cssnext": "^3.1.0",
    "postcss-import": "^11.1.0",
    "postcss-load-plugins": "^2.3.0",
    "postcss-mixins": "^6.2.0",
    "tailwindcss": "^0.5.1"
}

And created a postcss.config.js file:

module.exports = (ctx) => ({
    plugins: {
        postcss-import: {},
        postcss-mixins: {},
        tailwindcss: { './tailwind.js' },
        cssnext: {
            browsers: ['last 2 versions']
        },
        cssnano: ctx.env === 'production' ? {
            preset: ['default', {
                discardComments: {
                    removeAll: true,
                },
            }]
        } : false,
    }
})

And in my gulpfile.js I'm calling postcss() without passing anything in:

gulp.task("css", () => {
    return gulp
        .src(src.css + "index.css")
        .pipe(plumber(onError))
        ...
        .pipe(postcss())
        ...
});

But when I run things, I get the following error:

Error: Unexpected token -
{ /path/to/site/postcss.config.js:3
        postcss-import: {},
               ^
...

Any suggestions as to what I'm missing?

An in-range update of cssnano is breaking the build 🚨

Version 3.8.1 of cssnano just got published.

Branch Build failing 🚨
Dependency cssnano
Current Version 3.8.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As cssnano is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Release Notes v3.8.1
Commits

The new version differs by 8 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

How make it works with Gulp 4 (and gulp-postcss)?

Problem

Make postcss plugins load from postcss.config.js with a Gulp 4 task and gulp-postcss. Is there a way?

Issue [ Code ]

My simply gulp 4 postcss task

export const pcss = (done) => {
  return gulp.src(`${pkg.paths.elements}/**/*.pcss`)
    .pipe(postcss(->PLUGINS<-))
    .pipe(gulp.dest('./'));

  done();
}

gulp.task('postcss', pcss);

Environment

Please provide information about your environment.

OS Node npm PostCSS
Mac OS 9.2.1 5.6.0 4.1.1

An in-range update of postcss-sprites is breaking the build 🚨

Version 4.1.0 of postcss-sprites just got published.

Branch Build failing 🚨
Dependency postcss-sprites
Current Version 4.0.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As postcss-sprites is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 7 commits .

  • 9af4fe6 Bump v4.1.0
  • 8cb146f Update 'stylesheetPath' option in README
  • b7d3019 Merge pull request #73 from evandavis/file-relative-sprites
  • 1d0c2b3 Merge pull request #70 from niksy/issue-66
  • e910a7c locate sprites relative to the stylesheet
  • a7021b4 Add 'originalUrl' property to the image object
  • 131f06b Add support for Promises in "onSaveSpritesheet"

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Doesn’t work with postcss-cli for some reason

For some reason postcss-load-plugins doesn’t work with postcss-cli in my configuratin. Am I missing something?

Here is my package.json:

{
  "scripts": {
    "watch:js":  "watchify -vd -e app/views/js/index.js -o public_html/assets/index.js",
    "watch:css": "postcss -w -o public_html/assets/index.css app/views/css/index.css",
    "watch":     "npm-run-all --parallel watch:js watch:css"
  },
  "dependencies": {
    "normalize.css": "^4.2.0",
    "jquery": "^3.1.0",
    "vue": "^2.0.0-rc.2",
    "nouislider": "^8.5.1",
    "swiper": "^3.3.1",
    "malihu-custom-scrollbar-plugin": "^3.1.5"
  },
  "devDependencies": {
    "browserify": "^13.1.0",
    "watchify": "^3.7.0",
    "babel-core": "^6.13.2",
    "babel-preset-es2015": "^6.13.2",
    "babelify": "^7.3.0",
    "vueify": "^9.2.3",
    "uglify-js": "^2.7.1",
    "postcss-cli": "^2.5.2",
    "postcss-cssnext": "^2.7.0",
    "postcss-import": "^8.1.2",
    "postcss-load-plugins": "^2.0.0-alpha4",
    "postcss-url": "^5.1.2",
    "cross-env": "^2.0.0",
    "npm-run-all": "^2.3.0"
  },
  "browserify": {
    "transform": [
      "vueify",
      "babelify"
    ]
  },
  "babel": {
    "presets": ["es2015"]
  },
  "postcss": {
    "plugins": {
      "postcss-import": false,
      "postcss-cssnext": false,
      "postcss-url": false
    }
  }
}

Now trying to start: npm run watch:css. Here is the output:

> @ watch:css
> postcss -w -o public_html/assets/index.css app/views/css/index.css

Usage: /usr/bin/nodejs node_modules/.bin/postcss [--use|-u] plugin [--config|-c
config.json] [--output|-o output.css] [input.css]

[...]

Please specify at least one plugin name.

npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch:css"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! @ watch:css: `postcss -w -o public_html/assets/index.css app/views/css/index.css`
npm ERR! Exit status 1

[...]

I’ve also tried to specify postcss-load-plugins as a plugin in command line (postcss -u postcss-load-plugins), but it does not work either.

Thank you in advance.

An in-range update of standard is breaking the build 🚨

Version 8.6.0 of standard just got published.

Branch Build failing 🚨
Dependency standard
Current Version 8.5.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As standard is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 10 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Nothing happens when config is missing

Nothing happens when config is missing

For example if i try to do this:

var pluginsrc = require('postcss-load-plugins')()
pluginsrc.then( function(plugins) {
    console.log(plugins);
})

i will not get an error or anything else.
@ai

An in-range update of postcss is breaking the build 🚨

Version 6.0.15 of postcss was just published.

Branch Build failing 🚨
Dependency postcss
Current Version 6.0.14
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

postcss is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes 6.0.15
  • Add warning about missed from option on process().then() call.
  • Add IE 10 support.
FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of cosmiconfig is breaking the build 🚨

Version 2.1.1 of cosmiconfig just got published.

Branch Build failing 🚨
Dependency cosmiconfig
Current Version 2.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As cosmiconfig is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 3 commits .

  • 833385b Prepare 2.1.1
  • 6c4a1c7 Merge pull request #47 from davidtheclark/no-graceful-fs
  • de81cf6 Remove graceful-fs

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of postcss is breaking the build 🚨

Version 5.2.6 of postcss just got published.

Branch Build failing 🚨
Dependency postcss
Current Version 5.2.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As postcss is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Release Notes 5.2.6
  • Fix postcss.vendor for values with spaces (by @gucong3000).
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of postcss-cssnext is breaking the build 🚨

Version 2.10.0 of postcss-cssnext just got published.

Branch Build failing 🚨
Dependency postcss-cssnext
Current Version 2.9.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As postcss-cssnext is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes 2.10.0
Commits

The new version differs by 8 commits .

  • 6577f6c 2.10.0
  • 951b81d Added: new deactivation rules in features map (#345)
  • fe6d852 Merge pull request #342 from JLHwung/add-postcss-font-family-system-ui
  • cf5a472 feat(font-family-system-ui): add to playground example
  • af96203 feat(font-family-system-ui): add feature to the source
  • 711bcab feat(font-family-system-ui): add dependency
  • bc70661 feat(font-family-system-ui): add feature docs
  • cf304ac feat(font-family-system-ui): add test fixtures

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of postcss is breaking the build 🚨

Version 5.2.12 of postcss just got published.

Branch Build failing 🚨
Dependency postcss
Current Version 5.2.11
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As postcss is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… coverage/coveralls First build on greenkeeper/postcss-5.2.12 at 100.0% Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes 5.2.12
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of postcss-sprites is breaking the build 🚨

Version 4.2.0 of postcss-sprites just got published.

Branch Build failing 🚨
Dependency postcss-sprites
Current Version 4.1.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As postcss-sprites is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 6 commits .

  • 68d6e97 Bump v4.2.0
  • 2bc5d7a Add verbose option
  • 2142930 Fix typoe in the 'Skip Prefix' example
  • b11b6b2 Fix warning about rejected promise without an error
  • 78161c3 Merge pull request #78 from koppthe/fix-extract-url
  • a9f0c08 Fix 'getImageUrl' function

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Load plugins in cwd

When a CLI tool which uses this module is installed globally, it's supposed to find plugins in current working directory instead of the directory where the CLI is installed.

If I'm not mistaken, change require(plugin) to requireCwd(plugin) (https://github.com/sindresorhus/req-cwd) could solve this.

I am too stupid or plugin is too complex

I am using PostCSS like this:

const gulp = require('gulp')
const $ = require('gulp-load-plugins')()
const config = require('../gulp-config.js')
const postCSSPlugins = {
	postcssWillChange: require('postcss-will-change'),
	autoprefixer: require('autoprefixer'),
	postcssAssets: require('postcss-assets'),
	…
}
const postcssConfig = {
	postcss: [
		postCSSPlugins.postcssWillChange,
		postCSSPlugins.autoprefixer,
		postCSSPlugins.postcssAssets({
			loadPaths: [config.serve],
			…
		}),
		…
	]
}
gulp.task('styles', () => {
	return gulp.src(config.stylesToCompile)
		.pipe($.sourcemaps.init())
		.pipe($.postcss(postcssConfig))
		.pipe($.sourcemaps.write('.', {sourceRoot: config.stylesFolder}))
		.pipe(gulp.dest(config.serve))
})

How to use postcss-load-plugins in ”gulp” way?

I am tried something like this:

const postCSSPlugins = require('postcss-load-plugins')
const postcssConfig = {
	postcss: {
		plugins: postCSSPlugins({
			'postcss-will-change': {},
			'autoprefixer': {},
			'postcss-assets': {
				loadPaths: [config.serve]
			},
			…
		})
	}
}

But it's broken:

/usr/local/bin/node /Users/grawl/Sites/…/node_modules/gulp/bin/gulp.js --color --gulpfile /Users/grawl/Sites/…/gulpfile.js styles
[11:54:40] Using gulpfile ~/Sites/…/gulpfile.js
[11:54:40] Starting 'styles'...
[11:54:40] 'styles' errored after 124 ms
[11:54:40] Error in plugin 'gulp-postcss'
Message:
    Please provide array of postcss processors!

With similar plugins like posthtml-load-plugins or rollup-load-plugins, I do this:

const postHTMLPlugins = require('posthtml-load-plugins')
const posthtmlConfig = {
	plugins: postHTMLPlugins({
		'posthtml-bem': {
			elemPrefix: '-',
			modPrefix: '_',
			modDlmtr: '-'
		}
	})
}
const rollupPlugins = require('rollup-load-plugins')()
const rollupConfig = {
	…
	plugins: [
		rollupPlugins.sourcemaps({loadMaps: true}),
		rollupPlugins.includepaths({
			…
		}),
		…
	]
}

But how to use postcss-load-plugins with gulp?

Error on npm run production

The provided configuration from https://github.com/postcss/postcss-loader for the postcss.config.js file is the following:

module.exports = ({ file, options, env }) => {
    return {
        parser: file.extname === '.sss' ? 'sugarss' : false,
        plugins: {
            'postcss-import': { root: file.dirname },
            'postcss-cssnext': options.cssnext ? options.cssnext : false,
            'autoprefixer': env == 'production' ? options.autoprefixer : false,
            'cssnano': env === 'production' ? options.cssnano : false
        }
    };
}

While i'm using the above configuration and i try to do npm run watch, it works pretty well, but when i try to do npm run production i receive the following errors:

 ERROR  Failed to compile with 8 errors                                                                                                                           10:10:47

 error  in ./~/toastr/toastr.less

Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>

 @ ./~/toastr/toastr.less 4:14-154
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less

 error  in ./~/bootstrap-less/bootstrap/bootstrap.less

Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>

 @ ./~/bootstrap-less/bootstrap/bootstrap.less 4:14-163
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less

 error  in ./resources/assets/less/adminlte-app.less

Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>

 @ ./resources/assets/less/adminlte-app.less 4:14-217
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less

 error  in ./resources/assets/sass/app.scss

Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>

 @ ./resources/assets/sass/app.scss 4:14-267
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./~/bootstrap-less/bootstrap/bootstrap.less ./resources/assets/less/adminlte-app.less ./~/toastr/toastr.less

 error  in ./resources/assets/sass/app.scss

Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>
    at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
    at <anonymous>

 error  in ./~/bootstrap-less/bootstrap/bootstrap.less

Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>
    at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
    at <anonymous>

 error  in ./resources/assets/less/adminlte-app.less

Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>
    at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
    at <anonymous>

 error  in ./~/toastr/toastr.less

Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at load (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:42:38)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:66:18
    at Array.forEach (<anonymous>)
    at plugins (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/postcss-load-config/index.js:64:18
    at <anonymous>
    at runLoaders (/home/matheus/Repositorios/fidelidade-online/node_modules/webpack/lib/NormalModule.js:192:19)
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/home/matheus/Repositorios/fidelidade-online/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/home/matheus/Repositorios/fidelidade-online/node_modules/postcss-loader/lib/index.js:189:71)
    at <anonymous>

                                      Asset     Size  Chunks                    Chunk Names
            /js/app.9be25d8d3599f636ed1a.js   352 kB       0  [emitted]  [big]  /js/app
    /js/app-landing.4e4cffbf4f5d977096ec.js   216 kB       1  [emitted]         /js/app-landing
        /js/app.9be25d8d3599f636ed1a.js.map   362 kB       0  [emitted]         /js/app
/js/app-landing.4e4cffbf4f5d977096ec.js.map   221 kB       1  [emitted]         /js/app-landing
                          mix-manifest.json  4.63 kB          [emitted]         
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ production: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the @ production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/matheus/.npm/_logs/2017-12-08T12_10_48_182Z-debug.log

I looked at the file: /node_modules/postcss-load-plugins/lib/plugins.js
And i noticed that on the following if statement:
if (options === null || Object.keys(options).length === 0)

Its being tested only if the options object is null, if the object is not null it tries to
look at the keys of the object, but i believe that its being forgotten the case when the options object is undefined.

I changed my postcss.config.js to the following code:

module.exports = ({ file, options, env }) => {
    env = env || {};
    file = file || {};
    options = options || {};
    options.cssnext = options.cssnext || null;
    options.autoprefixer = options.autoprefixer || null;
    options.cssnano = options.cssnano || null;
    return {
        parser: file.extname === '.sss' ? 'sugarss' : false,
        plugins: {
            'postcss-import': { root: file.dirname },
            'postcss-cssnext': options.cssnext ? options.cssnext : false,
            'autoprefixer': env == 'production' ? options.autoprefixer : false,
            'cssnano': env === 'production' ? options.cssnano : false
        }
    };
}

And now both npm run watch and npm run production are working.
I don't know if any environment configuration could be useful, if someone need some just ask for it and i'll give it.
Thanks for your attention.

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.