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

NoSuchMethodError: method not found: 'call' #23

Closed
wayneashleyberry opened this issue Nov 2, 2016 · 2 comments
Closed

NoSuchMethodError: method not found: 'call' #23

wayneashleyberry opened this issue Nov 2, 2016 · 2 comments
Labels
Milestone

Comments

@wayneashleyberry
Copy link

Tried a simple test on my machine and got the following error.

/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:10549
        throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments(), null));
        ^

NoSuchMethodError: method not found: 'call'
Receiver: Closure '_render'
Arguments: [Instance of 'PlainJavaScriptObject']
    at Object.wrapException (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:4154:17)
    at StaticClosure.noSuchMethod$1 (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:10549:17)
    at Object.J.noSuchMethod$1$ (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:31521:39)
    at Object.Primitives_functionNoSuchMethod (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:4050:16)
    at Object.Primitives__genericApplyFunctionWithPositionalArguments (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:4091:20)
    at Object.Primitives_applyFunctionWithPositionalArguments (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:4077:16)
    at dart._callDartFunctionFast (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:13268:16)
    at Object.render (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/node_modules/dart-sass/sass.dart.js:13260:18)
    at Object.<anonymous> (/Users/Wayne/src/github.com/wayneashleyberry/styleguide/test.js:2:19)
    at Module._compile (module.js:573:32)

The command I ran was node test.js, here are the contents of test.js:

var sass = require('dart-sass');

var result = sass.render({
    'file': 'assets/sass/main.scss'
});

console.log(result)

The contents of assets/sass/main.scss are:

$font-stack: Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

I'm running node v7.0.0, macOS 10.12.1 and tried installing dart-sass with both yarn 0.16.1 and npm 3.10.9

@wayneashleyberry
Copy link
Author

wayneashleyberry commented Nov 2, 2016

If I install the package globally then it works just fine.

npm i -g dart-sass
dart-sass assets/sass/main.scss
body {
  font: 100% Helvetica, sans-serif;
  color: #333333;
}

@nex3 nex3 added the bug label Nov 7, 2016
@nex3 nex3 added this to the 1.0.0 milestone Nov 7, 2016
@nex3
Copy link
Contributor

nex3 commented Nov 8, 2016

This is actually a documentation error—like in node-sass, the render() method is asynchronous and takes a second callback parameter. Call renderSync() instead and this should work.

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

No branches or pull requests

2 participants