benjycui / bisheng

Transform Markdown(and other static files with transformers) into a SPA website using React.
MIT License
2.89k stars 420 forks source link

运行报错Unexpected end of JSON input #247

Open DaiShengloda opened 3 years ago

DaiShengloda commented 3 years ago

bisheng.config.js

module.exports = {
  source: './posts',
  output: './_site',
  theme: 'bisheng-theme-one',
  port: 8002,
};

package.json包版本如下:

"bisheng": "^3.1.0-beta.4",
"bisheng-theme-one": "^0.2.37",

运行bisheng start就会报变异错误,如下: image

chocking commented 2 years ago

@DaiShengloda

我把webpack的mode设置成'development', 能看到是这行代码报错

https://github.com/benjycui/bisheng/blob/7bf6e8c368c24be045555d7460298d9f1fe30229/packages/bisheng/src/routes.nunjucks.jsx#L7

最后在config.js配置个themeConfig空对象就好了