javascript - SyntaxError:在 Jenkins 中运行 Nightwatch 测试的意外标识符
问题描述
附件是我在尝试运行运行守夜脚本的詹金斯作业时遇到的错误。节点模块中的功能似乎存在问题。
期望的行为是 jenkins 中的作业成功运行。问题不在于我编写的代码。这在本地有效。这是节点和詹金斯之间的问题。
aws/workspace/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS/lib/node_modules/nightwatch/lib/utils/periodic-promise.js:39
async runAction({prevResult, prevQueuePromise}) {
^^^^^^^^^
SyntaxError: Unexpected identifier
这是节点模块代码...
async runAction({prevResult, prevQueuePromise}) {
if (!this.queue.length) {
return null;
}
const queuePromise = this.queue.shift();
const deferred = createPromise();
try {
const result = await this.perform(queuePromise, {prevResult, prevQueuePromise}, deferred);
if (this.queue.length) {
return await this.runAction({
prevResult: result,
prevQueuePromise: queuePromise
});
}
解决方案
推荐阅读
- selenium - 单击超链接时的 Selenium webdriver 问题
- java - ScheduledExecutorService 调用关闭进行无限调度
- html - 有没有办法禁用 chrome / firefox 的特定 css 功能
- c# - SqlBulkCopy 违反具有错误值的唯一约束
- r - 通过滚动日期或连续过滤日期来过滤数据
- php - 从 php 中的 url 中删除 %20
- c++ - librsvg 和 cairo;rsvg_handle_render_cairo() 失败;我究竟做错了什么?
- c# - C#:制作类时哪些成员将被序列化为XML元素[Serializable]
- unity3d - 使用 Unity SDK 从 Vimeo 流式传输可在编辑器中工作,但不会在构建中加载视频
- javascript - 替换和正则表达式异常