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

Syntax Error for @font-face #277

Closed
yummydum opened this issue Jan 6, 2020 · 7 comments
Closed

Syntax Error for @font-face #277

yummydum opened this issue Jan 6, 2020 · 7 comments

Comments

@yummydum
Copy link

yummydum commented Jan 6, 2020

Hi, I get the following error message, and I need help.

Situation

I installed commuter by yarn, launched the server, and accessed localhost:4000.
Then I get a 500:Internal Server Error.
The log shows the following error.

/usr/local/share/.config/yarn/global/node_modules/github-markdown-css/github-markdown.css:1
@font-face {
^

SyntaxError: Invalid or unexpected token
    at wrapSafe (internal/modules/cjs/loader.js:1055:16)
    at Module._compile (internal/modules/cjs/loader.js:1103:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@nteract/commuter/node_modules/@nteract/markdown/lib/markdown-render.js:18:1)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)

Reproduction

By the following dockerfile,

FROM node:latest

RUN yarn global add @nteract/commuter

EXPOSE 4000

CMD commuter

Build:docker build . -t commuter
Run:docker run -p 4000:4000 commuter.
Then open the browser and access localhost:4000.

Thanks for your help in advance.

@rob-davis-opti
Copy link

rob-davis-opti commented Jan 16, 2020

I get exactly the same having installed via npm. I resolved it (temporarily at least) by downgrading my version of @nteract/markdown to 4.0.0. It then loads up ok...

@captainsafia
Copy link
Member

Hello @robepdavis!

Thanks for opening this issue! This is related to an update that was made to the @nteract/markdown package. You can read more about this at nteract/nteract#4777.

The short-term fix is to add a css-loader to the configuration for commuter.

The long-term fix is to resolve the issue above from the nteract monorepo.

Would you be interested in helping resolve this bug with a contribution?

@riyadparvez
Copy link

+1. I am also facing the same issue.

@dhpollack
Copy link

@captainsafia could you provide a minimal example of adding a css-loader to the configuration?

@captainsafia
Copy link
Member

Hello folks! Apologies for the delay!

We ended up removing the github-markdown.css dependency that was causing this error in the latest version of the nteract/outputs package.

Since nteract/markdown is pinned to the major version, running npm install on the commuter should trigger bringing in the latest version of nteract/markdown (v4.3.7) that does not have this issue.

Can you let me know how that works for you?

@dhpollack
Copy link

I no longer receive this error, but now I have a new error. Using yarn dev on the master branch, I am able to get a listing of the notebooks, but then it fails with an error about a missing module d3-contour (see nteract/vega-embed-v3#3).

However, that's a new issue.

@captainsafia
Copy link
Member

Thanks for verifying the resolution, @dhpollack.

As for the other issue, I'll see if I can get someone who's worked on the vega packages to review that pull request you linked to so we can get a fix out.

I'll go ahead and close this issue now.

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

5 participants