Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylus-shell.js: TypeError: Object #<Renderer> has no method 'deps' #5

Open
helllamer opened this issue Jun 27, 2014 · 2 comments
Open

Comments

@helllamer
Copy link

Good day.

I've stumbled over runtime exception in stylus-shell.js.

NOTE: this issue reproduceable only in 5-10% developers workstations, but in 100% cases on this 5-10% workstations.

So, let's look at log:

$ sbt
[proj2] $ assets
[info] Stylus compiling on 1 source(s)
[error] [TypeError: Object #<Renderer> has no method 'deps']
[info] 
[success] Total time: 1 s, completed Jun 27, 2014 3:25:28 PM
[proj2] $ ^D

$ ls -R target/web/stylus
target/web/stylus/main/stylesheets:
main.css

As you can see, sbt-stylus printed error, printed "success" and successfully compiled .styl sources.

Let's look at stylus-shell.js:

  }).then(function(result) {
    return {
      source: input,
      result: {
          filesRead: [input].concat(result.style.deps()),
          filesWritten: [output]
      }
    };

As you can see, dangerous .deps() method is called here, not in stylus.

Problem goes away, if I replace .concat(result.style.deps()), with ,:

  }).then(function(result) {
    return {
      source: input,
      result: {
          filesRead: [input],
          filesWritten: [output]
      }
    };

This is quick and dirty solution, but it works. Hope, there will be better solution...

@huntc
Copy link

huntc commented Jul 6, 2014

I'm not sure about this one. Given:

https://github.com/LearnBoost/stylus/blob/master/bin/stylus#L574

It appears as though calling .deps should be fine. How could it be otherwise?

@mkurz
Copy link
Member

mkurz commented Jan 25, 2024

Pull requests are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants