Meteor-Community-Packages / meteor-postcss

PostCSS for Meteor

Home Page:https://packosphere.com/juliancwirko/postcss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module autoprefixer

bduff9 opened this issue · comments

Hi, I just updated to 2.0.2 in the latest version of Meteor (1.6.1.1) and followed the instructions in the readme (removed juliancwirko:postcss, added it back, ran meteor npm install --save-dev postcss@6.0.22 postcss-load-config@1.2.0 autoprefixer). versions has 2.0.2 as the version for this plugin and my package.json looks like:

{
  ...
  "devDependencies": {
    "@types/meteor": "1.4.15",
    "autoprefixer": "8.4.1",
    "babel-eslint": "8.2.3",
    "eslint": "4.19.1",
    "eslint-plugin-import": "2.11.0",
    "eslint-plugin-react": "7.7.0",
    "jshint": "2.9.5",
    "postcss": "6.0.22",
    "postcss-load-config": "1.2.0"
  },
  "postcss": {
    "plugins": {
      "autoprefixer": {
        "browsers": [
          "last 2 versions",
          "ie >= 9",
          "and_chr >= 2.3"
        ]
      }
    }
  }
}

However, when I try to start my app, I get the following error:

=> Errors prevented startup:

   While minifying app stylesheet:
   module.js:547:15: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
   at Function.Module._resolveFilename (module.js:547:15)
   at Function.Module._load (module.js:474:25)
   at Module.require (module.js:596:17)
   at require (internal/module.js:11:18)
   at load
   (/Users/bduffey2/.meteor/packages/juliancwirko_postcss/.2.0.2.j7xsh5.iw91k++os+web.browser+web.cordova/plugin.minifier-postcss.os/npm/node_modules/meteor/minifier-postcss/node_modules/postcss-load-plugins/lib/plugins.js:52:18)
   at
   /Users/bduffey2/.meteor/packages/juliancwirko_postcss/.2.0.2.j7xsh5.iw91k++os+web.browser+web.cordova/plugin.minifier-postcss.os/npm/node_modules/meteor/minifier-postcss/node_modules/postcss-load-plugins/lib/plugins.js:66:18
   at Array.forEach (<anonymous>)
   at plugins
   (/Users/bduffey2/.meteor/packages/juliancwirko_postcss/.2.0.2.j7xsh5.iw91k++os+web.browser+web.cordova/plugin.minifier-postcss.os/npm/node_modules/meteor/minifier-postcss/node_modules/postcss-load-plugins/lib/plugins.js:65:8)
   at
   /Users/bduffey2/.meteor/packages/juliancwirko_postcss/.2.0.2.j7xsh5.iw91k++os+web.browser+web.cordova/plugin.minifier-postcss.os/npm/node_modules/meteor/minifier-postcss/node_modules/postcss-load-config/index.js:64:18
   at /Users/bduffey2/.meteor/packages/meteor-tool/.1.6.1_1.146ofx8++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40


=> Your application has errors. Waiting for file change.

I have tried stopping and starting and even ran meteor reset to no avail. Any thoughts?

Yes, sorry, haven't tested it enough :/ Thanks for reporting.

@mitar do you have any idea how we can fix that? It doesn't work with config in separate .js file too. I think the problem is still the same, it works when used in packages folder locally.

commented

I made #36.

@bduff9 should work with 2.0.3 version. Thanks @mitar

commented

This can be closed now. I have tested it after publication on my app and it works for me.