Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest autoprefixer (0.6.20130721) fails with an exception #50

Closed
Leonya opened this issue Jul 25, 2013 · 5 comments
Closed

Latest autoprefixer (0.6.20130721) fails with an exception #50

Leonya opened this issue Jul 25, 2013 · 5 comments
Labels

Comments

@Leonya
Copy link
Contributor

Leonya commented Jul 25, 2013

Running "autoprefixer:dist" (autoprefixer) task
Warning: Cannot call method 'slice' of undefined Use --force to continue.
TypeError: Cannot call method 'slice' of undefined
    at utils.clone.keyframes (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/keyframes.js:18:30)
    at Array.map (native)
    at Keyframes.clone (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/keyframes.js:16:40)
    at Keyframes.cloneWithPrefix (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/keyframes.js:29:20)
    at /Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/processor.js:16:28
    at Prefixes.each (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/prefixes.js:135:25)
    at /Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/processor.js:15:31
    at CSS.eachKeyframes (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/css.js:21:11)
    at Processor.add (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer/processor.js:11:11)
    at Autoprefixer.rework (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js:59:31)
    at Autoprefixer.rework (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js:4:61)
    at Autoprefixer.compile (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/node_modules/autoprefixer/lib/autoprefixer.js:52:12)
    at /Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/tasks/autoprefixer.js:42:47
    at Array.forEach (native)
    at Object.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt-autoprefixer/tasks/autoprefixer.js:21:20)
    at Object.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/grunt/task.js:258:15)
    at Object.thisTask.fn (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/grunt/task.js:78:16)
    at Object.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:282:30)
    at Task.runTaskFn (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:235:24)
    at Task.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:281:12)
    at Task.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:215:7)
    at Task.runTaskFn (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:238:9)
    at Task.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:281:12)
    at Task.<anonymous> (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:215:7)
    at null._onTimeout (/Users/leonidkhachaturov/code/hdt/webui/playground/node_modules/grunt/lib/util/task.js:225:33)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
@Leonya
Copy link
Contributor Author

Leonya commented Jul 25, 2013

I can provide the CSS, if you need it for debugging.

@okonet
Copy link

okonet commented Jul 25, 2013

This issue is a combination of https://github.com/gruntjs/grunt-contrib-compass in development environment. Compass (SCSS) includes line comments into the generated CSS file:

/* line 42, ../../app/styles/main.scss */
html,
body,
.app {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

This option is enabled by default for grunt-contrib-compass. Autoprefixer doesn't fail when using following config for compass task in your Gruntfile:

compass:
    server:
        options:
          environment: 'development'
          noLineComments: yes

@ai
Copy link
Member

ai commented Jul 25, 2013

@okonet and this comments broke Autoprefixer? I can fix parser if you give me good example

@ai
Copy link
Member

ai commented Jul 26, 2013

@okonet this comments doesn’t broke Autoprefixer:

~/Dev/autoprefixer → echo "/* line 42, ../../app/styles/main.scss */
.app {
  overflow: hidden;
}" | ./bin/autoprefixer 
/* line 42, ../../app/styles/main.scss */

.app {
  overflow: hidden;
}

@Leonya wait your CSS to debug. If it possiblt, please try to find (like binary search) smallest part of CSS, that broke Autoprefixer :).

@ai
Copy link
Member

ai commented Jul 29, 2013

Issue was in comments in keyframes, @demiazz find it and fix: c9a1477

Tomorrow will be new release with fix.

@ai ai closed this as completed Jul 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants