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

gitbook-plugin-github-embed works locally but not remotely #1797

Closed
krabbypattified opened this issue May 11, 2017 · 5 comments
Closed

gitbook-plugin-github-embed works locally but not remotely #1797

krabbypattified opened this issue May 11, 2017 · 5 comments

Comments

@krabbypattified
Copy link

gitbook-plugin-github-embed (https://www.npmjs.com/package/gitbook-plugin-github-embed)
works fine locally but I get this error stack when I push to git.gitbook.com:

Downloading source
Pulling from S3
Extracting source
GitBook version is 3.2.2
Tweaking book.json
Installing plugins
info: installing 2 plugins using npm@3.9.2
info:
info: installing plugin "github-embed"
info: install plugin "github-embed" (*) from NPM with version 1.1.2
/tmp/book
└─┬ gitbook-plugin-github-embed@1.1.2
├── bluebird@3.5.0
├─┬ github@8.2.1
│ ├─┬ follow-redirects@0.0.7
│ │ ├─┬ debug@2.6.6
│ │ │ └── ms@0.7.3
│ │ └── stream-consume@0.1.0
│ ├─┬ https-proxy-agent@1.0.0
│ │ ├─┬ agent-base@2.0.1
│ │ │ └── semver@5.0.3
│ │ └── extend@3.0.1
│ ├── mime@1.3.4
│ └── netrc@0.1.4
└── node-html-encoder@0.0.2

info: >> plugin "github-embed" installed with success
info:
info: installing plugin "comment"
info: install plugin "comment" (*) from NPM with version 1.0.5
/tmp/book
├── gitbook-plugin-comment@1.0.5
└── gitbook-plugin-github-embed@1.1.2

info: >> plugin "comment" installed with success
Building Site, will upload
info: 9 plugins are installed
info: 8 explicitly listed
info: loading plugin "github-embed"... ERROR

PluginError: Error with plugin "github-embed": Unexpected token {

Here's my markdown

{% github_embed "https://github.com/v5analytics/gitbook-plugin-github-embed/blob/1cd16ac/index.js#L3-L8" %}{% endgithub_embed %}

And my book.json

{
    "plugins": ["github-embed"]
}

Link to my book: https://gaberogan.gitbooks.io/test/content/

CLI version: 2.3.0
GitBook version: 3.2.2
MacBook Pro (2013) OS Sierra

@krabbypattified
Copy link
Author

I know it's probably a problem with the plugin, but I don't think there should be an inconsistency between local and remote gitbook servers. (or should it?)

@Mackiovello
Copy link

I know it's probably a problem with the plugin, but I don't think there should be an inconsistency between local and remote gitbook servers. (or should it?)

No, there shouldn't. There are several situations where there are differences though.

Why is it that way? @AaronO

@jgrizou
Copy link

jgrizou commented Feb 1, 2018

@krabbypattified @Mackiovello did you find a solution to this issue since then?

I ran into the same problem just now :/

@Mackiovello
Copy link

@krabbypattified @Mackiovello did you find a solution to this issue since then?

No, I did not. But I've migrated to the new version of GitBook, so it's no longer a problem. The new version is shipping in 1-2 weeks: https://betadocs.gitbook.com/changelog#in-progress

@jgrizou
Copy link

jgrizou commented Feb 1, 2018

I got this answer from the Gitbook Slack:

That specific issue is most likely caused because the plugin is written in ES6 and not transpiled to ES5

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

4 participants