Spriter icon indicating copy to clipboard operation
Spriter copied to clipboard

Join() - object is not a function (Futures)

Open mikemilano opened this issue 11 years ago • 5 comments

I've installed via the instructions, but I am running into this error when I try to run spriter:

$ spriter assets/

/Users/abcdefg/Spriter/spriter.js:35
      join = Join();
             ^
TypeError: object is not a function
    at loadImages (/Users/abcdefg/Spriter/spriter.js:35:14)
    at spriter (/Users/abcdefg/Spriter/spriter.js:14:14)
    at Object.<anonymous> (/Users/abcdefg/Spriter/bin/spriter:5:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

mikemilano avatar Feb 11 '14 08:02 mikemilano

I get the same error. Tried reinstalling node completely, doesn't seem to work.

amanj2718 avatar Feb 21 '14 18:02 amanj2718

@mikemilano @amanj2718 I struggled with the same issue, and here is the workaround for it: In the repo's folder

$ cd node_modules/futures
$ rm -rf node_modules

Then open package.json (for futures), change "join": ">= 2.1.1" to "join": "~2.1.1". And then reinstall all dependencies for futures.

$ npm install

Done!

meetwudi avatar Jun 03 '14 15:06 meetwudi

why do you think this problem happens? I tried adding "join": "~2.1.1" directly to the Spriter package file. Then I'm able to run spriter without errors in the console, but the code inside join.when(function() { ... (in spriter.js line 17) is never called.

fariazz avatar Jun 24 '14 23:06 fariazz

I followed your steps @tjwudi but still get this:

fariazz@wayashama:~/www/quintus/Spriter$ spriter demo

/home/fariazz/www/quintus/Spriter/spriter.js:36
      join = Join();
             ^
TypeError: object is not a function
    at loadImages (/home/fariazz/www/quintus/Spriter/spriter.js:36:14)
    at spriter (/home/fariazz/www/quintus/Spriter/spriter.js:14:14)
    at Object.<anonymous> (/home/fariazz/www/quintus/Spriter/bin/spriter:5:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

By adding join to the Spriter package file I don't get console errors but the promise join.when() doesn't get triggered.

fariazz avatar Jun 24 '14 23:06 fariazz

I made a pull request - https://github.com/cykod/Spriter/pull/5/files but updating to latest packages solved the issue

jeronimo avatar Feb 17 '15 22:02 jeronimo