Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行出现: SyntaxError: 'import' and 'export' may appear only with 'sourceType: "module"' (1:0) #3

Closed
AngrygrayWolf opened this issue May 24, 2019 · 1 comment

Comments

@AngrygrayWolf
Copy link

类似之前在vue测试项目出现的issue。按照他们的解决方法修改babel.config.js也不可以。 npm清除缓存重装也无法解决问题。

说明

  1. 运行测试后,出现如图错误
    image
    提示出现大量的SyntaxError: 'import' and 'export' may only appear at the top level (2:0)
  2. 环境
    openSUSE 15.0
    node 10.15.3
    npm 6.4.1
  3. 感谢大佬。
@holylovelqq
Copy link
Owner

holylovelqq commented May 27, 2019

鉴于提出的错误信息,本人重新在windows和mac环境下运行测试均完美通过。并未出现相应问题。
基于每个人的运行环境及本地设置不同,很有可能出现不同的问题,对于此本人也是无能为力。建议自己去解决。尤其linux版本较多。
另外本仓库目的是技术分享交流,即使不能在本地正常运行,也并不影响实质内容。
还是在此提一下本地运行基础环境:

  • node:8.12.0(或更高)
  • npm:随node一起安装
  • vue-cli:v3.3.0(或更高)
  • 其他建议最新稳定版
    以上,同时关闭本issue,如有疑问欢迎继续提issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants