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

e2e testing fails with an error #205

Closed
ryaa opened this issue Jan 3, 2017 · 4 comments
Closed

e2e testing fails with an error #205

ryaa opened this issue Jan 3, 2017 · 4 comments

Comments

@ryaa
Copy link

ryaa commented Jan 3, 2017

I followed the instructions form http://lathonez.github.io/2016/ionic-2-e2e-testing/ and when i execute npm run e2e on the last step I got the below error:

Alexs-MacBook-Pro:boss811.mobile alexryltsov$ npm run e2e

> boss811.mobile@ e2e /Users/alexryltsov/Git/boss811.mobile
> protractor

[13:59:43] I/direct - Using ChromeDriver directly...
[13:59:43] I/launcher - Running 1 instances of WebDriver
[13:59:44] E/launcher - Error: TypeError: SpecReporter is not a constructor
    at onPrepare (/Users/alexryltsov/Git/boss811.mobile/protractor.conf.js:30:34)
    at /Users/alexryltsov/Git/boss811.mobile/node_modules/protractor/built/util.js:45:49
    at Function.promise (/Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:682:9)
    at Object.runFilenameOrFn_ (/Users/alexryltsov/Git/boss811.mobile/node_modules/protractor/built/util.js:37:16)
    at /Users/alexryltsov/Git/boss811.mobile/node_modules/protractor/built/runner.js:93:27
    at _fulfilled (/Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:796:13)
    at /Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:556:49
    at runSingle (/Users/alexryltsov/Git/boss811.mobile/node_modules/q/q.js:137:13)
[13:59:44] E/launcher - Process exited with error code 100

npm ERR! Darwin 16.3.0
npm ERR! argv "/Users/alexryltsov/.nvm/versions/node/v6.9.2/bin/node" "/Users/alexryltsov/.nvm/versions/node/v6.9.2/bin/npm" "run" "e2e"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! boss811.mobile@ e2e: `protractor`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the boss811.mobile@ e2e script 'protractor'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the boss811.mobile package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs boss811.mobile
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls boss811.mobile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/alexryltsov/Git/boss811.mobile/npm-debug.log
Alexs-MacBook-Pro:boss811.mobile alexryltsov$

The sources can be found at https://ryaa@bitbucket.org/bossgit/boss811.mobile.git in master branch

@ryaa
Copy link
Author

ryaa commented Jan 4, 2017

Changing the below line in protractor.conf.js fixed the problem

var SpecReporter = require('jasmine-spec-reporter');
to be
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;

@lathonez
Copy link
Owner

lathonez commented Jan 4, 2017

Any idea why you'd be getting this problem as opposed to anyone else (including both CI build tools)?

Any differences in package versions?

@ryaa
Copy link
Author

ryaa commented Jan 4, 2017

Looks like they have a breaking change in the recent release 3.0.0 - see https://github.com/bcaudan/jasmine-spec-reporter/releases

I have "jasmine-spec-reporter": "^3.0.0", while your package.json has 2.7.0

Since I followed your blog instructions it installed the latest version for me

@lathonez
Copy link
Owner

lathonez commented Jan 4, 2017

Thanks very much, noted for when we upgrade.

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