Syntax Error for @font-face
yummydum opened this issue · comments
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.
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...
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?
+1. I am also facing the same issue.
@captainsafia could you provide a minimal example of adding a css-loader to the configuration?
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?
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.
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.