报错:To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
报错原因:运行了含es6语法的代码(import exoort)
解决方法:添加package.json文件,指定type为module
{
"type": "module"
}
问题解决!
报错:To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
报错原因:运行了含es6语法的代码(import exoort)
解决方法:添加package.json文件,指定type为module
{
"type": "module"
}
问题解决!