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

TypeError: Object #<Object> has no method 'hypot' #31

Closed
ElSebita opened this issue Nov 28, 2015 · 2 comments
Closed

TypeError: Object #<Object> has no method 'hypot' #31

ElSebita opened this issue Nov 28, 2015 · 2 comments
Labels

Comments

@ElSebita
Copy link

Hello.
I followed the instructions, I installed everything including patel-c as global. make throws that error.
I installed es6-math as global, which is said to provide Math.hypot but still can't build.
Fedora 22.

/home/meneldur/Downloads/Iosevka-master/node_modules/libspiro-js/libspiro.js:218
        r[i].seg_ch = Math.hypot(dx, dy);
                           ^
TypeError: Object #<Object> has no method 'hypot'
    at setup_path (/home/meneldur/Downloads/Iosevka-master/node_modules/libspiro-js/libspiro.js:218:22)
    at run_spiro (/home/meneldur/Downloads/Iosevka-master/node_modules/libspiro-js/libspiro.js:581:10)
    at Object.spiroToBezierOnContext (/home/meneldur/Downloads/Iosevka-master/node_modules/libspiro-js/libspiro.js:614:7)
    at _r0_t4._r76_t0 (/home/meneldur/Downloads/Iosevka-master/support/spirokit.js:313:185)
    at _r0_t4._r0_t17 (/home/meneldur/Downloads/Iosevka-master/support/glyph.js:79:100)
    at _r0_t4._r230_t2 (/home/meneldur/Downloads/Iosevka-master/buildglyphs.js:222:278)
    at _r102_t60 (/home/meneldur/Downloads/Iosevka-master/buildglyphs.js:122:171)
    at _r102_t79 (/home/meneldur/Downloads/Iosevka-master/buildglyphs.js:220:20)
    at _r0_t4._r102_t127 (/home/meneldur/Downloads/Iosevka-master/buildglyphs.js:515:423)
    at _r102_t60 (/home/meneldur/Downloads/Iosevka-master/buildglyphs.js:120:308)
onegroup.mk:43: recipe for target 'build/.pass0-iosevka-regular.fdt' failed
make[1]: *** [build/.pass0-iosevka-regular.fdt] Error 8
makefile:25: recipe for target 'fdts-default' failed
make: *** [fdts-default] Error 2
@be5invis
Copy link
Owner

Well installing Math.hypot globally cannot solve this problem. You can install the core-js in the repository directory and add the following code to the beginning of generate.js (and maybe extract.js):

require('core-js');

BTW, AFAIK the latest Node has built-in support for Math.hypot, as well as Symbol.iterator.

@ElSebita
Copy link
Author

core-js was installed. Adding that line of code to generate.js and extract-js solved the problem.
Thanks!

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