vuepress / vuepress-plugin-mathjax

:page_with_curl: Use TeX in VuePress.
https://vuepress.github.io/plugins/mathjax.html
MIT License
32 stars 10 forks source link

vuepress version 1.0.0-alpha.48 breaks plugin #10

Closed songololo closed 5 years ago

songololo commented 5 years ago

The latest version of vuepress@next breaks vuepress-plugin-mathjax, giving the following errors in the console:

Uncaught Error: Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(913:9) Unknown word

  911 |   position: absolute;
  912 |   font-family: MJXZERO;
> 913 |   white space: nowrap;
      |         ^
  914 |   height: 1px;
  915 |   width: 1px;

    at eval (cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/@vuepress/core/.temp/plugins-mathjax.css:1)
    at Object../node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/@vuepress/core/.temp/plugins-mathjax.css (app.js:1499)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (plugins-mathjax.css?9492:4)
    at Object../node_modules/@vuepress/core/.temp/plugins-mathjax.css (app.js:1070)
    at __webpack_require__ (app.js:767)
    at fn (app.js:130)
    at eval (enhanceApp.js?0708:1)
    at Module../node_modules/vuepress-plugin-mathjax/src/enhanceApp.js (app.js:1854)

and

./node_modules/@vuepress/core/.temp/plugins-mathjax.css (./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!./node_modules/postcss-loader/src??ref--7-oneOf-1-2!./node_modules/@vuepress/core/.temp/plugins-mathjax.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(913:9) Unknown word

  911 |   position: absolute;
  912 |   font-family: MJXZERO;
> 913 |   white space: nowrap;
      |         ^
  914 |   height: 1px;
  915 |   width: 1px;

Adding (i.e. forcing downgrade to) vuepress/core@v1.0.0-alpha.47 fixes the issue.

shigma commented 5 years ago

I have just released a new version 1.2.5. Does it work now?

songololo commented 5 years ago

Upgraded to the latest version and a similar error occurs:

✖ Server
  Compiled with some errors in 21.69s

(undefined) ./node_modules/@vuepress/core/.temp/plugins-mathjax.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(913:9) Unknown word

  911 |   position: absolute;
  912 |   font-family: MJXZERO;
> 913 |   white space: nowrap;
      |         ^
  914 |   height: 1px;
  915 |   width: 1px;

    at /.../node_modules/webpack/lib/NormalModule.js:302:20
    at /.../node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /.../node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/.../node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /.../node_modules/postcss-loader/src/index.js:207:9
 @ ./node_modules/vuepress-plugin-mathjax/src/enhanceApp.js 1:0-34
 @ ./node_modules/@vuepress/core/.temp/app-enhancers/3.js
 @ ./node_modules/@vuepress/core/.temp/internal/app-enhancers.js
 @ ./node_modules/@vuepress/core/lib/client/app.js
 @ ./node_modules/@vuepress/core/lib/client/clientEntry.js
 @ multi ./node_modules/@vuepress/core/lib/client/clientEntry.js
(undefined) ./node_modules/@vuepress/core/.temp/plugins-mathjax.css
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(913:9) Unknown word

  911 |   position: absolute;
  912 |   font-family: MJXZERO;
> 913 |   white space: nowrap;
      |         ^
  914 |   height: 1px;
  915 |   width: 1px;

 @ ./node_modules/vuepress-plugin-mathjax/src/enhanceApp.js 1:0-34
 @ ./node_modules/@vuepress/core/.temp/app-enhancers/3.js
 @ ./node_modules/@vuepress/core/.temp/internal/app-enhancers.js
 @ ./node_modules/@vuepress/core/lib/client/app.js
 @ ./node_modules/@vuepress/core/lib/client/serverEntry.js
 @ multi ./node_modules/@vuepress/core/lib/client/serverEntry.js
Error: Failed to compile with errors.
    at /.../node_modules/@vuepress/core/lib/node/build/index.js:186:16
    at finalCallback (/.../node_modules/webpack/lib/MultiCompiler.js:247:12)
    at /.../node_modules/webpack/lib/MultiCompiler.js:270:6
    at done (/.../node_modules/neo-async/async.js:2931:13)
    at runCompilers (/.../node_modules/webpack/lib/MultiCompiler.js:174:48)
    at /.../node_modules/webpack/lib/MultiCompiler.js:181:7
    at /.../node_modules/webpack/lib/MultiCompiler.js:263:7
    at finalCallback (/.../node_modules/webpack/lib/Compiler.js:220:39)
    at /.../node_modules/webpack/lib/Compiler.js:236:13
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/.../node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:33:1)
    at AsyncSeriesHook.lazyCompileHook (/.../node_modules/tapable/lib/Hook.js:154:20)
    at onCompiled (/.../node_modules/webpack/lib/Compiler.js:234:21)
    at /.../node_modules/webpack/lib/Compiler.js:631:15
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/.../node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/.../node_modules/tapable/lib/Hook.js:154:20)
    at /.../node_modules/webpack/lib/Compiler.js:628:31
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1
shigma commented 5 years ago

A related PR: mathjax/mathjax-v3#256 I'm trying to figure out a solution...

shigma commented 5 years ago

Version 1.2.8 may solve this issue.

songololo commented 5 years ago

@Shigma yes it works now with v1.2.8, thank you!