尝试在cypress上使用打字稿时出错:“ import”和“ export”可能仅在“ sourceType:module”中出现

时间:2019-05-15 11:13:16

标签: cypress

尝试在黄瓜特征文件中使用打字稿时出现以下错误。如果将.ts更改为.js,一切正常。错误似乎也很无知。

SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
    at EventEmitter.handler (C:\Users\A527629\AppData\Local\Cypress\Cache\3.2.0\Cypress\resources\app\packages\server\lib\plugins\util.js:67:29)
    at emitOne (events.js:115:13)
    at EventEmitter.emit (events.js:210:7)
    at ChildProcess.<anonymous> (C:\Users\...\Local\Cypress\Cache\3.2.0\Cypress\resources\app\packages\server\lib\plugins\util.js:25:29)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at emit (internal/child_process.js:768:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

我引用了url对其进行了配置。

有关设置的更多详细信息,请访问-url

0 个答案:

没有答案