maxtaco / coffee-script

IcedCoffeeScript
http://maxtaco.github.com/coffee-script
MIT License
726 stars 58 forks source link

Broken 'require' for Windows pathnames #56

Open dejj opened 11 years ago

dejj commented 11 years ago

When including a .coffee file (which must contain an await-defer) from a different directory and compiling with iced, e.g.

PrioList = require('./public/libs/util-priolist').PrioList

the following error occurs:

filename: "C:\Dokumente und Einstellungen\Dejj\Desktop\myproj\pin
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:437:25)

The error does not occur under Linux or if the file to be included is in the same directory or if no await-defer is present. Compiling the file under Windows with just coffee works fine too.

0rland commented 11 years ago

users = require './users' There are the same symptoms. But if rename users.iced to modelUsers.iced users = require './modelUsers' then it's ok