Phantom JS weakmap错误

时间:2017-04-26 16:57:11

标签: angular webpack jasmine phantomjs karma-runner

我正在使用webpack,angular 2,karma 0.13,jasmine 2.4.1

我在我的应用程序中没有引用weakmap。无法解决最新版本的phantomjs

***指START:

ts-loader: Using typescript@2.2.2 and C:\\tsconfig.json
26 04 2017 12:48:25.002:INFO [karma]: Karma v0.13.22 server started at http://localhost:9999/
26 04 2017 12:48:25.033:INFO [launcher]: Starting browser PhantomJS
26 04 2017 12:48:27.939:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket 6_yGicfWc30o_UC2AAAA with id 19438296
PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
  ReferenceError: Can't find variable: WeakMap
  at C:/src/tests.entry.ts:9
PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
  ReferenceError: Can't find variable: WeakMap
  at C:/src/tests.entry.ts:9***

PhantomJS 2.1.1(Windows 7 0.0.0)错误   ReferenceError:找不到变量:WeakMap   在C:/src/tests.entry.ts:9 PhantomJS 2.1.1(Windows 7 0.0.0)错误   ReferenceError:找不到变量:WeakMap   在C:/src/tests.entry.ts:9

1 个答案:

答案 0 :(得分:0)

在我的情况下,我使用的是利用了weakmap的软件包。根据phantom.js(https://github.com/ariya/phantomjs/issues/13652)上的此问题,Phantomjs目前无法跟上Webkit核心的步伐。

建议选择其他无头浏览器或使用babel-polyfill。

相关问题