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

0.1.8 fails with Cannot call method 'bind' of undefined #3075

Closed
zeppelin opened this issue Jan 23, 2015 · 20 comments
Closed

0.1.8 fails with Cannot call method 'bind' of undefined #3075

zeppelin opened this issue Jan 23, 2015 · 20 comments
Assignees

Comments

@zeppelin
Copy link
Contributor

Both ember server & npm test fails

npm: 2.2.0
node: v0.10.33
osx 10.10

ember-server

~/tc/client  ± minor-enhancements   ember server
version: 0.1.8
Cannot call method 'bind' of undefined
TypeError: Cannot call method 'bind' of undefined
  at Function.Watcher (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/sane/index.js:64:33)
  at Class.module.exports.Task.extend.init (/Users/Zeppelin/tc/client/node_modules/ember-cli/lib/models/server-watcher.js:9:56)
  at new Class (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/core-object/core-object.js:18:12)
  at Class.module.exports.Task.extend.run (/Users/Zeppelin/tc/client/node_modules/ember-cli/lib/tasks/serve.js:32:23)
  at Class.module.exports.Command.extend.run (/Users/Zeppelin/tc/client/node_modules/ember-cli/lib/commands/serve.js:47:18)
  at Class.<anonymous> (/Users/Zeppelin/tc/client/node_modules/ember-cli/lib/models/command.js:131:17)
  at $$$internal$$tryCatch (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:490:16)
  at $$$internal$$invokeCallback (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:502:17)
  at $$$internal$$publish (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:473:11)
  at Object.$$rsvp$asap$$flush [as _onImmediate] (/Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1581:9)
  at processImmediate [as _immediateCallback] (timers.js:345:15)

npm test

 ✘  ~/tc/client  ± minor-enhancements   npm test

> [email protected] test /Users/Zeppelin/tc/client
> ember test

version: 0.1.8
Built project successfully. Stored in "/Users/Zeppelin/tc/client/tmp/class-tests_dist-tyioNlMM.tmp".
not ok 1 PhantomJS 1.9 - global failure
    ---
        actual: >
            null
        message: >
            SyntaxError: Parse error
        Log: >
    ...

1..1
# tests 1
# pass  0
# fail  1
npm ERR! Test failed.  See above for more details.
@stefanpenner
Copy link
Contributor

what version of node, npm, and what os.

@stefanpenner
Copy link
Contributor

seems like an old version of sane, https://github.com/amasad/sane/blob/master/index.js does not contain a line 64.

@zeppelin
Copy link
Contributor Author

sorry, edited

@stefanpenner
Copy link
Contributor

can you cat this file /Users/Zeppelin/tc/client/node_modules/ember-cli/node_modules/sane/index.js ?

@zeppelin
Copy link
Contributor Author

here you are sir: http://cl.ly/code/0K2L2u3p3d3n

@stefanpenner
Copy link
Contributor

yes this is the wrong sane, and not the one I or CI seem to be installing..

@zeppelin
Copy link
Contributor Author

shouldn't nom take care of this?

@stefanpenner
Copy link
Contributor

wget http://registry.npmjs.org/ember-cli/-/ember-cli-0.1.8.tgz
tar -tvf  ember-cli-0.1.8.tgz | grep node_modules/sane

yields 2 installations of sane,

"sane": "1.0.0-rc1"
"sane": "0.8.0",

@stefanpenner
Copy link
Contributor

find . -iname package.json | xargs jq '{name: .name, deps: .dependencies}' yields ember-cli is for some reason including the old version.

The question remains, why the resolution algorithm is choosing the incorrect version for you.... that confuses me.

@jgwhite
Copy link
Contributor

jgwhite commented Jan 23, 2015

Looks like sane is a bundled dependency and has been for a while:
https://github.com/ember-cli/ember-cli/blob/master/package.json#L81

@stefanpenner
Copy link
Contributor

@jgwhite ya its fixed 52623293ad95

not fixed, needs more investigation

@stefanpenner
Copy link
Contributor

looks like sane in broccoli-sane-watcher also needs to be updated, but i don't have time for that right now I can do that this weekend (unless someone can beet me)

@stefanpenner
Copy link
Contributor

@zeppelin can you cat node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/index.js for me?

@zeppelin
Copy link
Contributor Author

I don't even have node_modules/broccoli-sane-watcher

@stefanpenner
Copy link
Contributor

sorry edited

@zeppelin
Copy link
Contributor Author

'use strict';

var NodeWatcher = require('./src/node_watcher');
var PollWatcher = require('./src/poll_watcher');
var WatchmanWatcher = require('./src/watchman_watcher');

function sane(dir, options) {
  if (options.poll) {
    return new PollWatcher(dir, options);
  } else if (options.watchman) {
    return new WatchmanWatcher(dir, options);
  } else {
    return new NodeWatcher(dir, options);
  }
}

module.exports = sane;
sane.NodeWatcher = NodeWatcher;
sane.PollWatcher = PollWatcher;
sane.WatchmanWatcher = WatchmanWatcher;

looks a lot like https://github.com/amasad/sane/blob/master/index.js

@jgwhite
Copy link
Contributor

jgwhite commented Jan 23, 2015

@zeppelin do you have time for a quick screenshare? Would be great to know exactly what conditions trigger this.

@jgwhite
Copy link
Contributor

jgwhite commented Jan 23, 2015

@zeppelin I’m [email protected] on Screenhero. Ping me if you have a moment.

@zeppelin
Copy link
Contributor Author

thanks a lot guys! if someone tells me again oss doesn't have proper support, I'll have him eat his hat :P

@jgwhite
Copy link
Contributor

jgwhite commented Jan 23, 2015

😄

stefanpenner added a commit that referenced this issue Jan 23, 2015
[fixes #3075] ensure watcher is actually new'd correctly
stefanpenner added a commit that referenced this issue Jan 28, 2015
kielni pushed a commit to kielni/ember-cli that referenced this issue Feb 5, 2015
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

4 participants