{"action":"created","issue":{"url":"https://api.github.com/repos/postcss/postcss/issues/729","repository_url":"https://api.github.com/repos/postcss/postcss","labels_url":"https://api.github.com/repos/postcss/postcss/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/postcss/postcss/issues/729/comments","events_url":"https://api.github.com/repos/postcss/postcss/issues/729/events","html_url":"https://github.com/postcss/postcss/issues/729","id":132711831,"number":729,"title":"TypeError: Cannot read property 'before' of undefined","user":{"login":"timaschew","id":110870,"avatar_url":"https://avatars.githubusercontent.com/u/110870?v=3","gravatar_id":"","url":"https://api.github.com/users/timaschew","html_url":"https://github.com/timaschew","followers_url":"https://api.github.com/users/timaschew/followers","following_url":"https://api.github.com/users/timaschew/following{/other_user}","gists_url":"https://api.github.com/users/timaschew/gists{/gist_id}","starred_url":"https://api.github.com/users/timaschew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timaschew/subscriptions","organizations_url":"https://api.github.com/users/timaschew/orgs","repos_url":"https://api.github.com/users/timaschew/repos","events_url":"https://api.github.com/users/timaschew/events{/privacy}","received_events_url":"https://api.github.com/users/timaschew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-02-10T14:23:08Z","updated_at":"2016-02-10T16:18:46Z","closed_at":null,"body":"I'm using webpack and have two css files. One file uses an `@import` of the other.\r\nThe imported file cannot be loaded, because I get this error:\r\n\r\n```\r\nERROR in ./~/css-loader!./~/postcss-loader!./src/styles/styles.css\r\nModule build failed: TypeError: Cannot read property 'before' of undefined\r\n    at Stringifier.raw (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/stringifier.js:120:30)\r\n    at Stringifier.body (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/stringifier.js:91:31)\r\n    at Stringifier.root (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/stringifier.js:37:14)\r\n    at Stringifier.stringify (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/stringifier.js:33:24)\r\n    at _class.stringify (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/stringify.js:14:9)\r\n    at _class.generateString (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/map-generator.js:235:14)\r\n    at _class.generateMap (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/map-generator.js:192:14)\r\n    at _class.generate (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/map-generator.js:275:25)\r\n    at LazyResult.stringify (/Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/lazy-result.js:226:24)\r\n    at /Users/timaschew/dev/redux-boilerplate/node_modules/postcss/lib/lazy-result.js:163:27\r\n @ ./src/styles/styles.css 4:14-125 13:2-17:4 14:20-131\r\n```\r\n\r\nMy webpack config looks like this:\r\n\r\n```js\r\nvar cssnext = require('cssnext')\r\nvar precss = require('precss')\r\n\r\nmodule.exports = {\r\n  module: {\r\n    loaders: [\r\n      {\r\n        test: /\\.css/,\r\n        exclude: [/node_modules/],\r\n        loader: 'style!css!postcss'\r\n      }\r\n    ]\r\n  },\r\n  postcss: function() {\r\n    return [\r\n      cssnext({\r\n        autoprefixer: ['last 2 version']\r\n      }),\r\n      precss\r\n    ]\r\n  }\r\n```\r\n\r\nI logged the object where the error happens:\r\n\r\n```js\r\nRule {\r\n  nodes:\r\n   [ Declaration {\r\n       type: 'decl',\r\n       parent: [Circular],\r\n       source: [Object],\r\n       before: '\\n    ',\r\n       prop: 'color',\r\n       between: ': ',\r\n       value: '#ccc' } ],\r\n  type: 'rule',\r\n  parent:\r\n   Root {\r\n     raws: { semicolon: false, after: '\\n' },\r\n     type: 'root',\r\n     nodes: [ [Circular], [Object], [Object], [Object] ],\r\n     source: { input: [Object], start: [Object] },\r\n     lastEach: 51,\r\n     indexes: {},\r\n     _autoprefixerDisabled: false,\r\n     variables: { column: '200px' } },\r\n  source:\r\n   { start: { line: 1, column: 1 },\r\n     input:\r\n      Input {\r\n        css: '.foobar {\\n    color: #ccc;\\n}\\n',\r\n        safe: false,\r\n        file: '/Users/timaschew/dev/redux-boilerplate/src/styles/vendor.css',\r\n        from: '/Users/timaschew/dev/redux-boilerplate/src/styles/vendor.css' },\r\n     end: { line: 3, column: 1 } },\r\n  before: '',\r\n  between: ' ',\r\n  selector: '.foobar',\r\n  semicolon: true,\r\n  after: '\\n',\r\n  lastEach: 9,\r\n  indexes: {},\r\n  _autoprefixerDisabled: false }\r\n```"},"comment":{"url":"https://api.github.com/repos/postcss/postcss/issues/comments/182454562","html_url":"https://github.com/postcss/postcss/issues/729#issuecomment-182454562","issue_url":"https://api.github.com/repos/postcss/postcss/issues/729","id":182454562,"user":{"login":"ai","id":19343,"avatar_url":"https://avatars.githubusercontent.com/u/19343?v=3","gravatar_id":"","url":"https://api.github.com/users/ai","html_url":"https://github.com/ai","followers_url":"https://api.github.com/users/ai/followers","following_url":"https://api.github.com/users/ai/following{/other_user}","gists_url":"https://api.github.com/users/ai/gists{/gist_id}","starred_url":"https://api.github.com/users/ai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai/subscriptions","organizations_url":"https://api.github.com/users/ai/orgs","repos_url":"https://api.github.com/users/ai/repos","events_url":"https://api.github.com/users/ai/events{/privacy}","received_events_url":"https://api.github.com/users/ai/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T16:18:45Z","updated_at":"2016-02-10T16:18:45Z","body":"@timaschew post stacktrace again, you may miss some changes."}}