Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDavid Klotz
19,659 Pointssublime text + Autoprefixer
I'm trying to use Autoprefixer with sublime text 2 and I get a message "Autoprefixer global name 'Json' is not defined".
Does anyone know what this means and how to fix it? Thanks in advance to anyone that can offer help!
2 Answers
Kate Hrycak
5,542 PointsHey David, Looks like there was an outstanding issue for Autoprefixer that was resolved around the same time you posted this. For more info: https://github.com/sindresorhus/sublime-autoprefixer/issues/42
Cheers, Katie
David Klotz
19,659 PointsKate thanks for your response and link! Someone who isn't a treehouse member came across my post and shared the following which worked as well so I thought I would go ahead and post it too.
- In Sublime Text 2, go to Preferences > Browse Packages...
- In the "Autoprefixer" folder, open up the file "Autoprefixer.py."
- Before the first line of the file, add the line
import json
. (it's giving you the error because it doesn't know how to do json operations yet)
And that's it! You should be able to do Ctrl/Cmd+Shift+P, type "Autoprefixer", and press enter on a CSS file and it should prefix it.