antvis / gatsby-theme-antv

⚛️ Polished Gatsby theme for documentation site
https://gatsby-starter-theme-antv.antv.vision/zh
Other
344 stars 57 forks source link

npm run start 项目运行报错 #385

Open violetjack opened 1 year ago

violetjack commented 1 year ago

当我通过 README 来创建项目并运行的时候,报 babel 错误。

$ yarn global add gatsby-cli
$ gatsby new mysite https://github.com/antvis/gatsby-starter-theme-antv
$ cd mysite
$ yarn start

"@antv/gatsby-theme-antv" threw an error while running the createPages lifecycle: Error: [BABEL] /C:/Users/violetjack/github/G2-4/examples/bar/basic/demo/bsic.ts: The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean. (While pro cessing: "base3333$inherits")

查了源码发现是 @babel/standalone 中的 stage-3 这个 preset 里面用到了 @babel/plugin-proposal-decorators,它的配置引起了报错。

详见 掘金文章

github-actions[bot] commented 1 year ago

⚡️ Deploying PR Preview...