【发布时间】:2020-05-13 15:19:39
【问题描述】:
我基于此tutorial 在我的项目中使用带有pkg 的next.js,但是当我运行pkg 命令时出现错误:
> Error! This experimental syntax requires enabling
one of the following parser plugin(s): 'flow, typescript' (13:7)
/app/node_modules/ast-types-flow/lib/types.js
打包命令:
pkg . -t node13-linux-x64 -o build
包版本:4.4.8
我尝试添加选项,但仍然不起作用:
"pkg": {
"assets": [".next/**/*"],
"scripts": [".next/dist/**/*.js"],
"options": ["experimental-modules"]
}
如何解决这个问题?
【问题讨论】:
标签: javascript node.js dockerfile next.js zeit-pkg