Skip to content

Template Error - TypeError: Cannot call method 'replace' of undefined #291

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

Closed
victorhooi opened this issue Nov 21, 2013 · 3 comments · Fixed by #682
Closed

Template Error - TypeError: Cannot call method 'replace' of undefined #291

victorhooi opened this issue Nov 21, 2013 · 3 comments · Fixed by #682

Comments

@victorhooi
Copy link

Hi,

I'm attempting to run collaborative-markdown:

https://github.com/joeyb/collaborative-markdown

which uses marked.

However, when I try to access the application, I get the following error message:

Template Error
TypeError: Cannot call method 'replace' of undefined
Please report this to https://github.com/chjj/marked.
    at Lexer.lex (/Users/victorhooi/code/collaborative-markdown/node_modules/marked/lib/marked.js:130:6)
    at Function.Lexer.lex (/Users/victorhooi/code/collaborative-markdown/node_modules/marked/lib/marked.js:121:16)
    at marked (/Users/victorhooi/code/collaborative-markdown/node_modules/marked/lib/marked.js:1091:31)
    at Object.<anonymous> (/Users/victorhooi/code/collaborative-markdown/lib/app/index.js:32:12)
    at fnValue (/Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/viewPath.js:160:13)
    at dataValue (/Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/viewPath.js:347:13)
    at /Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/View.js:919:12
    at /Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/View.js:597:46
    at render (/Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/View.js:232:12)
    at Object.get (/Users/victorhooi/code/collaborative-markdown/node_modules/derby/lib/View.js:301:30)

Cheers,
Victor

@kpiljoong
Copy link

You may have accessed to the page that isn't made yet - which means that the markdown value is undefined.

@givankin
Copy link

I hit the same when trying to use https://github.com/FGRibreau/doxx which depends on deprecated github-flavored-markdown.

Has an API changed from github-flavored-markdown to marked? If yes, probably such issues should be addressed in projects that depend on the library. If not, it looks a bug.

@scottgonzalez
Copy link
Contributor

Duplicate of #417.

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

Successfully merging a pull request may close this issue.

4 participants