单元测试覆盖率,浏览器版本报告没有出现百分比;Handlebars: Access has been denied to resolve the property "statements" be...
Handlebars: Access has been denied to resolve the property "statements" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "branches" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "functions" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "lines" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
题目中的问题从Hadnlebars官方文档得到了答案,文档
下面是问题复现和解决步骤;
handlebars@4.7.6 error 复现:
使用 handlebars@4.7.6 的时候:
- 运行命令:
$ npm run coverage
-
问题截图:
-
浏览器报告截图:
-
handlebars@4.7.6 版本信息截图:
使用 handlebars@4.5.3 的时候:
- 命令
首先 命令 or 手动删除 handlebars
然后运行👇命令
$ npm install handlebars@4.5.3
+ handlebars@4.5.3
added 3 packages from 1 contributor, updated 1 package and audited 514 packages in 6s
30 packages are looking for funding
run `npm fund` for details
found 2 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
开始单元测试命令:
$ npm run coverage
-
终端截图:
-
浏览器报告截图:
-
handlebars@4.5.3 版本信息截图: