Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6839679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:44:53+00:00 2026-05-26T23:44:53+00:00

As I was playing around for the first time with CoffeeScript, I ran in

  • 0

As I was playing around for the first time with CoffeeScript, I ran in to a problem. In order to debug my problem, I tried replacing my whole file with one of the example bits of code from the coffee script site:

kids =
  brother:
    name: "Max"
    age:  11
  sister:
    name: "Ida"
    age:  9

However, when I try to compile that code, I get:

Error: In coffee/main.coffee, Parse error on line 3: Unexpected 'INDENT'
    at Object.parseError (/usr/lib/coffeescript/parser.js:501:11)
    at Object.parse (/usr/lib/coffeescript/parser.js:573:32)
    at Object.compile (/usr/lib/coffeescript/coffee-script.js:23:22)
    at /usr/lib/coffeescript/command.js:99:27
    at /usr/lib/coffeescript/command.js:72:28
    at fs:84:13
    at node.js:773:9
In coffee/main.coffee, Parse error on line 3: Unexpected 'INDENT'

Since this is code from the CoffeeScript site, I assume the code itself isn’t the problem. However, the compiler also seems to be working properly; if I compile:

a = 2

it generates a file with:

(function(){
  var a;
  a = 2;
})();

as expected. So in other words, the code is good, the compiler is good, and yet somehow I’m getting this Unexpected ‘IDENT’ error … can anyone help me understand what is going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:44:54+00:00Added an answer on May 26, 2026 at 11:44 pm

    I am pretty sure this is a tabs-vs-spaces issue. Tell your editor not to convert spaces to tabs if it does that. Also, go through your code with the cursor and make sure it doesn’t jump over blank areas.

    The issue is that while normal editors see a tab as equivalent to two or four spaces, coffeescript sees it as one space, so the indentation gets messed up.

    If this all doesn’t help, make sure you have a recent coffeescript version, e.g. 1.1.0 or newer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am playing around with Google Maps for the first time. And I am
I am playing around with ASP.NET MVC for the first time, so I apologize
This is my first time playing around with linq and I can't quite figure
Just playing around with Wordpress 3.0 for the first time. I've installed the Custom
I'm playing around with Backbone.js for the first time, and I'm having a bit
I'm playing around with GHCi for the first time, and I'm having some trouble
I'm playing around with Google maps for the first time, so I looked at
I'm just playing around for the first time with jQuery's ajax functionality. I wanted
I am using HTML 5 for the first time, and playing around with this
I'm playing around with RoR for the first time and hit a weird error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.