尝试在黄瓜特征文件中使用打字稿时出现以下错误。如果将.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