mechio / takana

Takana lets you see your SCSS and CSS style changes live, in the browser, as you type them
http://takana.io
MIT License
1.11k stars 61 forks source link

Bad Request #78

Closed JamesJosephFinn closed 9 years ago

JamesJosephFinn commented 9 years ago

It appears that takana.js is making a bad request.

Here's the console log:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:48626/live/styles.css.map

The takana terminal output is all green:

[09:41:49] [INFO] - editor server listening on 48627
[09:41:49] [INFO] - webserver listening on 48626
[09:41:49] [INFO] - installing plugin to '/Users/jamesfinn/Library/Application Support/Sublime Text 3/Packages/Takana'
[09:41:49] [INFO] - running on project /Users/jamesfinn/Documents/larrys-site
[09:41:50] [INFO] - editor connected
[09:42:21] [INFO] - browser connected to project default
[09:42:21] [INFO] - matched file:///Users/jamesfinn/Documents/larrys-site/styles.css ----> /Users/jamesfinn/Documents/larrys-site/styles.css
[09:42:21] [INFO] - rendered /Users/jamesfinn/Documents/larrys-site/styles.css

Whether I hook up the browser using python -m SimpleHTTPServer localhost:8000, or just open it using the file:// protocol, I get the same console error. Terminal output for the python server is all 200 OK.

If I try to visit the requested resource in a browser tab, the following is shown in the viewport:

Cannot GET /live/styles.css.map
JamesJosephFinn commented 9 years ago

Update:

I rm'd the .css and .css.map files from project root. This solved the problem, and replaced it with a new one:

[WARN] - couldn't find a match for file:///Users/jamesfinn/Documents/larrys-site/styles.css

I get the same error if I use localhost.

barnaby commented 9 years ago

Hey James, what working directory are you running takana from?

JamesJosephFinn commented 9 years ago

Hi Barnaby. I got it to work. (sort of) Takana was able to find main.scss after I changed it's name to styles.scss. Apparently, Takana won't find the scss stylesheet if it is named differently than the css stylesheet linked in the head (?)

However, this now presented a new problem:

[21:39:28] [WARN] - error rendering /Users/jamesfinn/.takana/scratch//scss/styles.scss : { file: '/Users/jamesfinn/Documents/larrys-site/bower_modules/breakpoint-sass/stylesheets/breakpoint/parsers',
  line: 198,
  message: ' expected \'in\' keyword in @each directive' }

So, I un@imported the Breakpoint library, and then it threw the same error for Susy:

message: ' expected \'in\' keyword in @each directive' }

So, I un@imported Susy as well, and then everything worked!

But, I need Breakpoint and Susy in my workflow, so I went about trying to fix it. I figured it was the outdated node-sass in takana. I cd'd into takana and npm installed the @latest of node-sass.

But, all that did was break the build. Takana didn't throw any errors. In fact, everything was green. However, the browser didn't reflect changes.

This all boils down to two questions:

  1. Do you think updating node-sass would solve the parsing error being thrown by Takana?
  2. If so, is it even possible?
JamesJosephFinn commented 9 years ago

I think it best if I open a new issue.