Skip to content

Error whith empty .less file #224

Closed
Closed

Description

@instanceofme

In less for Node.js, if you @import a less file that exists but is empty (strictly - 0 characters exactly), you get a JavaScript error @ parser.js:190: str is not a String, and thus has no "replace" method.

A trivial workaround is putting a space in the file, so this is no big deal.

Activity

  1. tylerball commented on Sep 27, 2011

    @tylerball

    With current version of less I don't even get an error importing a blank .less file. The parser chokes and omits all subsequent imports.

  2. matthew-dean commented on Nov 24, 2011

    @matthew-dean
    Member

    Yes, that's what I'm seeing. If it tries to import a blank file, it doesn't import anything else after that.

  3. jnewman commented on Dec 20, 2011

    @jnewman

    On Chromium 15, I'm getting the same error (well, lackof) with any amount of white space in a blank file.

  4. richardhenry commented on May 31, 2012

    @richardhenry

    Also reported in #540

  5. lukeapage commented on Jul 18, 2012

    @lukeapage
    Member

    similar if not the same as #179

  6. lukeapage commented on Aug 12, 2012

    @lukeapage
    Member

    I've made a test case with an empty file and imported that empty file and then put a class with one property and it works..

    So either this is fixed or I need a better test case.. anyone want to give it a go with the latest source and confirm?

    If you find its still a problem I'll re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions