Ser-Gen / postcss-data-packer

PostCSS plugin to move an embedded data to separate file
MIT License
20 stars 2 forks source link

[TypeError: Cannot read property 'annotation' of undefined] #15

Closed Grawl closed 8 years ago

Grawl commented 8 years ago

Using PostCSS via NPM script with following config:

{
  "input": "assets/css/styles.css",
  "replace": true,
  "map": "assets/css/styles.css.map",
  "use": [
    "postcss-devtools",
    "postcss-import",
    "autoprefixer",
    "postcss-data-packer",
    "cssnano"
  ],
  "autoprefixer": "last 2 versions",
  "cssnano": {
    "safe": true,
    "discardComments": {
      "removeAll": true
    },
    "minifySelectors": false,
    "discardDuplicates": false
  },
  "postcss-data-packer": {
    "dest": "assets/css/data.css"
  },
  "local-plugins": true
}

Getting an error:

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.5.0/bin/node" "/usr/local/bin/npm" "run" "postcss"
npm ERR! node v5.5.0
npm ERR! npm  v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! 85@ postcss: `postcss --config postcss.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the 85@ postcss script 'postcss --config postcss.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the 85 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     postcss --config postcss.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 85
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 85
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/grawl/Sites/netcat-extra-5.6.0.16028.2/netcat_template/template/85/npm-debug.log

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.5.0/bin/node" "/usr/local/bin/npm" "run" "build:styles"
npm ERR! node v5.5.0
npm ERR! npm  v3.5.3
npm ERR! code ELIFECYCLE
npm ERR! 85@ build:styles: `npm run stylus && npm run postcss`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the 85@ build:styles script 'npm run stylus && npm run postcss'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the 85 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run stylus && npm run postcss
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 85
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 85
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/grawl/Sites/netcat-extra-5.6.0.16028.2/netcat_template/template/85/npm-debug.log

Removing postcss-data-packer from my config runs clear, so I think it's your plugin.

OS X El Capitan 10.11.3 node version 5.5.0 npm version 3.5.3 postcss version 5.0.14 postcss-data-packer version 1.2.2

Ser-Gen commented 8 years ago

Can't reproduce on windows 8.1 with same config and versions of node, npm, postcss-data-packer. I use postcss-cli 2.5.1 with postcss 5.0.16. In next days will try on ubuntu machine.

Grawl commented 8 years ago

I think it's maybe related only for PostCSS CLI. Same happened yesterday when I launch postcss --config postcss.json just with Terminal.

Ser-Gen commented 8 years ago

Can't confirm bug on ubuntu. I get ELIFECYCLE only when postcss-cli config was wrong.