evilsoft / crocks

A collection of well known Algebraic Data Types for your utter enjoyment.
https://crocks.dev
ISC License
1.59k stars 102 forks source link

Async broken - Uncaught ReferenceError: isFunction is not defined #120

Closed flintinatux closed 7 years ago

flintinatux commented 7 years ago

I don't have any trouble bundling with browserify, but if I bundle with wepback using es6 import syntax like this:

import Async from 'crocks/crocks/Async'

then I get this error in the browser:

Uncaught ReferenceError: isFunction is not defined
    at curry (curry.js:15)
    at eval (isSameType.js:37)
    at Object.<anonymous> (authoring.bundle.js:11045)
    at __webpack_require__ (authoring.bundle.js:556)
    at fn (authoring.bundle.js:87)
    at eval (Async.js:10)
    at Object.<anonymous> (authoring.bundle.js:10991)
    at __webpack_require__ (authoring.bundle.js:556)
    at fn (authoring.bundle.js:87)
    at Object.eval (socketCollabs.js:9)

I can clearly see in the curry.js file that isFunction is very defined, so I'm thinking it might be something in your dependency tree that is confusing poor webpack. Happy to help duplicate the error for you when you get a chance. In the meantime, I've fallen back to Promise, which is not a good match for redux action creators, but it'll do until we get Async working.

evilsoft commented 7 years ago

Good find. I think I know what is going on. Will get on this.

evilsoft commented 7 years ago

@flintinatux hmm. the thing I thought is was is not giving me issue. I am having a hard time repro-ing. Would it be possible to get some more information? Like:

flintinatux commented 7 years ago

Try it in rise-frontend#master. Just import it into any file, and you should get the same result.

evilsoft commented 7 years ago

Looks like this is resolved. Closing.