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: undefined is not a function #4

Open
GauravC3 opened this issue Aug 5, 2015 · 4 comments
Open

TypeError: undefined is not a function #4

GauravC3 opened this issue Aug 5, 2015 · 4 comments

Comments

@GauravC3
Copy link

GauravC3 commented Aug 5, 2015

Looks like ansimd has stopped working because of changes in marked or modules used by marked.

var md = require('ansimd')
undefined
md("Hello World!")
TypeError: undefined is not a function
Please report this to https://github.com/chjj/marked.
at InlineLexer.output (/Users/gauravlahoti/Desktop/node_modules/ansimd/node_modules/marked/lib/marked.js:685:28)
at Parser.tok (/Users/gauravlahoti/Desktop/node_modules/ansimd/node_modules/marked/lib/marked.js:1075:50)
at Parser.parse (/Users/gauravlahoti/Desktop/node_modules/ansimd/node_modules/marked/lib/marked.js:935:17)
at Function.Parser.parse (/Users/gauravlahoti/Desktop/node_modules/ansimd/node_modules/marked/lib/marked.js:922:17)
at marked (/Users/gauravlahoti/Desktop/node_modules/ansimd/node_modules/marked/lib/marked.js:1218:19)
at render (/Users/gauravlahoti/Desktop/node_modules/ansimd/index.js:21:13)
at repl:1:1
at REPLServer.defaultEval (repl.js:132:27)
at bound (domain.js:254:14)
at REPLServer.runBound as eval

@lmmx
Copy link

lmmx commented Aug 18, 2015

Same here, following the README's example:

ansimd foo.md

/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:1226
    throw e;
          ^
TypeError: undefined is not a function
Please report this to https://github.com/chjj/marked.
    at InlineLexer.output (/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:685:28)
    at Parser.tok (/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:1075:50)
    at Parser.parse (/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:935:17)
    at Function.Parser.parse (/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:922:17)
    at marked (/usr/local/lib/node_modules/ansimd/node_modules/marked/lib/marked.js:1218:19)
    at render (/usr/local/lib/node_modules/ansimd/index.js:21:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/ansimd/cli.js:14:13)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

lmmx added a commit to lmmx/node-ansimd that referenced this issue Aug 18, 2015
@lmmx
Copy link

lmmx commented Aug 18, 2015

Fixed 👍 Don't know if it's worth leaving a comment to the marked repo that they broke compatibility? :-/

@GauravC3
Copy link
Author

Thanks a ton mate. I hope the request gets merged soon.

Looking at the change, it looks like the marked repo moved onto a better practice. The developers knew they will break dependent code. Fixing ansimd looks like a better approach.

@lmmx
Copy link

lmmx commented Aug 18, 2015

Agreed. And you're welcome :-)

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

2 participants