Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should addphantomjs-prebuilt in package.json #385

Closed
lijiarui opened this issue Mar 31, 2017 · 1 comment
Closed

should addphantomjs-prebuilt in package.json #385

lijiarui opened this issue Mar 31, 2017 · 1 comment

Comments

@lijiarui
Copy link
Member

lijiarui commented Mar 31, 2017

when I run unit test to test the code in a new environment, it occurs the following error:

➜  wechaty git:(functionMember) ✗ npm run nycava

> [email protected] nycava /Users/lijiarui/git/rui/wechaty
> WECHATY_HEAD=chrome nyc ava --serial --fail-fast --verbose --timeout=3m "dist/{src,test}/**/*.spec.js"


Error: Cannot find module 'phantomjs-prebuilt'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/lijiarui/git/rui/wechaty/dist/test/webdriver-phantomjs.spec.js:7:345)
    at Module._compile (module.js:573:32)
    at Module.replacementCompile (/Users/lijiarui/git/rui/wechaty/node_modules/nyc/node_modules/append-transform/index.js:58:13)
    at extensions.(anonymous function) (/Users/lijiarui/git/rui/wechaty/node_modules/require-precompiled/index.js:13:11)
    at /Users/lijiarui/git/rui/wechaty/node_modules/nyc/node_modules/append-transform/index.js:62:4
    at require.extensions.(anonymous function) (/Users/lijiarui/git/rui/wechaty/node_modules/ava/lib/process-adapter.js:105:4)
    at Object.<anonymous> (/Users/lijiarui/git/rui/wechaty/node_modules/nyc/node_modules/append-transform/index.js:62:4)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)

maybe it should add to package.json by default

after I installed phantomjs-prebuilt and do as Test which I have tried successfully before,
it occurs the following error:

    at process._tickCallback (internal/process/next_tick.js:103:7)
  ✖ src › puppet-web › browser › quit() Error: initChromeDriver() got invalid driver
Unhandled Rejection: dist/src/puppet-web/browser.spec.js
  Error: Server terminated early with status 1
    earlyTermination.catch.e (node_modules/selenium-webdriver/remote/index.js:252:52)

Unhandled Rejection: dist/src/puppet-web/browser.spec.js
  Error: Server terminated early with status 1
    earlyTermination.catch.e (node_modules/selenium-webdriver/remote/index.js:252:52)

Unhandled Rejection: dist/src/puppet-web/browser.spec.js
  Error: Server terminated early with status 1
    earlyTermination.catch.e (node_modules/selenium-webdriver/remote/index.js:252:52)

Unhandled Rejection: dist/src/puppet-web/browser.spec.js
  Error: Server terminated early with status 1
    earlyTermination.catch.e (node_modules/selenium-webdriver/remote/index.js:252:52)
@huan
Copy link
Member

huan commented Mar 31, 2017

Short answer:

No, we need not do that before we fix the phantomjs issue #28 #60 .

Long answer:

PhantomJS did not work after for serval months.

It only can pass unit tests, but wechaty-bro.js does not work inside phantomjs anymore, which should be debugged & fix in the future.

So I believe it's not necessary to install it and waste disk space for the user before it be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants