Meteor-Community-Packages / meteor-postcss

PostCSS for Meteor

Home Page:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

errors on startup in Meteor

CaptainN opened this issue · comments

I'm getting the following errors in my console in Meteor (and previously in

=> Errors prevented startup:

While minifying app stylesheet:
error: Can't load npm module 'postcss-easy-import' from
packages/minifier-postcss_plugin.js. Check your Npm.depends().
error: Can't load npm module 'postcss-nested' from
packages/minifier-postcss_plugin.js. Check your Npm.depends().
error: Can't load npm module 'postcss-simple-vars' from
packages/minifier-postcss_plugin.js. Check your Npm.depends().
error: Can't load npm module 'rucksack-css' from
packages/minifier-postcss_plugin.js. Check your Npm.depends().

Hi, could you paste your package.json file contents here? Also, have you installed all Npm dependencies? Thanks.

Here is my package.json:

  "name": "make-beliefs-comix-redux",
  "private": true,
  "version": "0.0.1",
  "main": "client/main.js",
  "scripts": {
    "start": "meteor --settings settings-development.json",
    "debug": "meteor debug --settings settings-development.json",
    "ios": "meteor run ios-device --settings settings-development.json",
    "test": "meteor test-app --driver-package practical meteor:mocha"
  "dependencies": {
    "dompurify": "^0.7.4",
    "immutable": "^3.7.6",
    "invariant": "^2.2.1",
    "meteor-node-stubs": "~0.2.0",
    "moment": "^2.13.0",
    "moment-timezone": "^0.5.3",
    "react": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-mounter": "^1.2.0",
    "react-redux": "^4.4.4",
    "redux": "^3.4.0",
    "redux-thunk": "^2.1.0",
    "velocity-react": "^1.1.5"
  "devDependencies": {
    "autoprefixer": "^6.3.6",
    "babel-plugin-transform-class-properties": "^6.10.2"
  "postcss": {
    "plugins": {
      "postcss-easy-import": {},
      "postcss-nested": {},
      "postcss-simple-vars": {},
      "rucksack-css": {},
      "autoprefixer": {"browsers": ["last 2 versions"]}

It is all installed. The error only happens when I have the meteor package installed (maybe that's obvious). I haven't actually chosen my plugins yet, this is some default set. Could that be all it is?

Here is my meteor packages file:

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base             # Packages every Meteor app needs to have
mobile-experience       # Packages for a great mobile UX
mongo                   # The database Meteor supports right now
blaze-html-templates    # Compile .html files into Meteor Blaze views
tracker                 # Meteor's client-side reactive programming library

standard-minifier-js    # JS minifier run for production mode
es5-shim                # ECMAScript 5 compatibility for older browsers.
ecmascript              # Enable ECMAScript2015+ syntax in app code

# less is more

# Meteor Accounts

# quick and dirty login
# ian:accounts-ui-bootstrap-3

# The magical Simple Schema, Autoform and family

# Quick RTB for autoform
# mpowaga:autoform-summernote

# i18n
# tap:i18n

# Info on crashes

# make sure we are checking our arguments

# only permit some sites to frame us

# defining roles

# easy admin

# there are always better methods

# reactive react
# react-meteor-data

# just a color picker

# shoot those files at the images server

# bring the cloud to the ground

# the babel of CSS

I might be missing something, but should the last package listed be juliancwirko:postcss ?

Am I not supposed to install that package in Meteor 1.3+?

Hi, yes it should be listed as juliancwirko:postcss not juliancwirko:posts ;)

@CaptainN sorry for the delay, I have so little time nowadays :/ If you declare your plugins in the postcss: {...} key you should always install them from Npm. So you should have it in the dependencies or devDependencies then you need to run npm update or you can install them like: npm install postcss-easy-import --save-dev etc.

If you don't want to use them, remove them from "postcss": {"plugins":{...}) key.

Hello @juliancwirko,

This package worked for me in Meteor 1.4.1. Thank you for creating it! It's unfortunate that your readme states that you'd like to abandon Meteor because you're obviously beneficial to the Meteor community, especially the part that uses PostCSS and Symantic UI.

I believe that I know why @CaptainN was having problems. In the, there is an example package.json file:

  "name": "demo PostCSS app",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "devDependencies": {
    "autoprefixer": "^6.3.5",
    "mocha": "^2.4.5",
    "postcss-easy-import": "^1.0.1",
    "postcss-nested": "^1.0.0",
    "postcss-simple-vars": "^1.2.0",
    "rucksack-css": "^0.8.5"
  "postcss": {
    "plugins": {
      "postcss-easy-import": {},
      "postcss-nested": {},
      "postcss-simple-vars": {},
      "rucksack-css": {},
      "autoprefixer": {"browsers": ["last 2 versions"]}

This probably needs to say something like "Make sure that the plugins that you list in "plugins" are also in "devDependencies" as well. You may not need the plugins in this example, so please include them only if you need them."

Again, your package is working correctly for me in Meteor 1.4.1, and I would like to encourage you to rejoin the Meteor community by maintaining this package and others in the future. You may not always see the benefits or be thanked for your effort when you give to others by making a Meteor package, or a library/package for any framework/language/platform, but you do benefit us all, so thank you, again, for creating this package!

Hey, thanks for the good word. I need to check it with Meteor 1.4.1 maybe there were some problems in early 1.4 version. Anyways it is still very hard to maintain this package because Meteor's build system is very limited. But of course I'll test it with newest Meteor version and if it will be good I'll edit the file. I'll also add more information about example code as you pointed. Thanks.

yeah it seems to work when used with only autoprefixer, but my demo app frozes on start. It runs eventually but it takes ages.

@juliancwirko Thank you for continuing to work on this project!

It seems that the package works quite good with new Meteor versions, so I'll close this one for now.