cycold / cycold.github.io

Please dot not star...
4 stars 1 forks source link

运行vue的测试: 出错 : Path must be a string. Received null #147

Closed cycold closed 6 years ago

cycold commented 7 years ago

参考: https://github.com/karma-runner/karma-phantomjs-launcher/issues/120

vue [my-dev●] node
> console.log(require('phantomjs-prebuilt'));
{ path: null,
  version: '2.1.1',
  cleanPath: [Function],
  exec: [Function],
  run: [Function] }
undefined
>

npm install phantomjs-prebuilt 后:

ue [my-dev●] node
> console.log(require('phantomjs-prebuilt'));
{ path: '/Users/cycold/Developer/github/vue/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs',
  platform: 'darwin',
  arch: 'x64',
  version: '2.1.1',
  cleanPath: [Function],
  exec: [Function],
  run: [Function] }
undefined