---
title: 兼容性测试工具报告显示异常的解决方法
description: "兼容性测试工具报告显示异常，打开Chrome浏览器开发者工具，发现有“structuredClone is not defined”或“Uncaught SyntaxError: Unexpected token '.'”报错。"
url: "https://www.hikunpeng.com/document/detail/zh/nativedevp/userguide/faq/NativeDevelopment_0100.html"
---

# 兼容性测试工具报告显示异常的解决方法

#### 现象描述

兼容性测试工具报告显示异常，打开Chrome浏览器开发者工具，发现有“structuredClone is not defined”或“Uncaught SyntaxError: Unexpected token '.'”报错。


#### 可能原因

兼容性测试报告部分代码在较低版本的浏览器上无法解析。


#### “structuredClone is not defined”报错的处理步骤

1. 进入compatibility_testing.tar.gz解压后的文件夹目录。
2. 打开template.html.template文件，修改第134行代码，将其修改为：

```
const dataCopy = JSON.parse(JSON.stringify(pipelineData[target]?.[`${target}_tb_data`]));
```


  图1 修改前

  图2 修改后

3. 再次执行兼容性测试。


#### “Uncaught SyntaxError: Unexpected token '.'”报错的处理步骤

1. 进入compatibility_testing.tar.gz解压后的文件夹目录。
2. 打开template.html.template文件，修改文件中所有的“?.”。

  a. 场景一：对于“?.[]”的形式就把“?.”都去掉。
  b. 场景二：对于“?.name”的形式就把“?”去掉。
3. 再次执行兼容性测试。
