Closed rickkowal closed 8 years ago
@rickkowal can you try on latest starter snapshot?
Thanks for the reply. I'm still getting the same error after downloading the latest snapshot. Any suggestions?
I'm on Mac OS 10.11 and I updated my homebrew installation as well as Java, and was able to get the task running (it opened the browser), but then crashed with:
[10:15:21] I/local - Selenium standalone server started at http://192.168.8.100:53177/wd/hub [10:15:24] E/launcher - Error: TSError: ⨯ Unable to compile TypeScript e2e/home/home.spec.ts (3,9): Cannot find name 'browser'. (2304) e2e/home/home.spec.ts (8,9): Cannot find name 'browser'. (2304) e2e/home/home.spec.ts (9,22): Cannot find name 'element'. (2304) e2e/home/home.spec.ts (9,30): Cannot find name 'by'. (2304)
Sorry I cannot reproduce the issue even from fresh clone and install, can you try on node 5 or later?
closing as no response, please try on latest snapshot
I have a similar one with newest snapshot on:
Operating System | Windows 7 x64 |
Node version | 6.9.1 |
NPM Version | 3.10.8 |
Environment | Cygwin console |
$ npm run e2e
angular2-starter@1.0.1 e2e E:\WWW\WebdevHomepage\admin gulp e2e
============ Angular 2 Starter ============ Current environment: development
[16:58:37] Using gulpfile E:\WWW\WebdevHomepage\admin\gulpfile.js [16:58:37] Starting 'driver-update'... [16:58:37] I/file_manager - creating folder E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium [16:58:37] I/downloader - selenium standalone: downloading version 2.53.1 [16:58:37] I/downloader - curl -o E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium/selenium-server-standalone-2.53.1.jar https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar [16:58:37] I/downloader - chromedriver: downloading version 2.26 [16:58:37] I/downloader - curl -o E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium/chromedriver_2.26win32.zip https://chromedriver.storage.googleapis.com/2.26/chromedriver_win32.zip [16:58:37] I/downloader - geckodriver: downloading version v0.11.1 [16:58:37] I/downloader - curl -o E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium/geckodriver-v0.11.1-win64.zip https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-win64.zip [16:58:38] I/update - chromedriver: unzipping E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26win32.zip [16:58:41] I/update - geckodriver: unzipping E:\WWW\WebdevHomepage\admin\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.11.1-win64.zip [16:58:44] Finished 'driver-update' after 6.74 s [16:58:44] Starting 'e2e-test'... [16:58:44] Finished 'e2e-test' after 17 ms [16:58:44] Starting 'e2e'... [16:58:44] Finished 'e2e' after 20 μs [16:58:44] I/local - Starting selenium standalone server... [16:58:44] I/launcher - Running 1 instances of WebDriver [16:58:45] E/launcher - Server terminated early with status 1 [16:58:45] E/launcher - Error: Server terminated early with status 1 at Error (native) at E:\WWW\WebdevHomepage\admin\nodemodules\selenium-webdriver\remote\index.js:242:20 at ManagedPromise.invokeCallback (E:\WWW\WebdevHomepage\admin\nodemodules\selenium-webdriver\lib\promise.js:1379:14) at TaskQueue.execute (E:\WWW\WebdevHomepage\admin\nodemodules\selenium-webdriver\lib\promise.js:2913:14) at TaskQueue.executeNext (E:\WWW\WebdevHomepage\admin\node_modules\selenium-webdriver\lib\promise.js:2896:21) at asyncRun (E:\WWW\WebdevHomepage\admin\node_modules\selenium-webdriver\lib\promise.js:2775:27) at E:\WWW\WebdevHomepage\admin\node_modules\selenium-webdriver\lib\promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7) [16:58:45] E/launcher - Process exited with error code 199 [16:58:45] Error running E2E testing
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "E:\Tools\nodejs\node.exe" "E:\Tools\nodejs\node_modules\npm\bin\npm-cli.js" "run" "e2e"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! angular2-starter@1.0.1 e2e: gulp e2e
npm ERR! Exit status 1
I didn't change anything in the source yet. Any suggestions what to try?
Add this line at the beginning of your e2e typescript tests:
import { ElementFinder, browser, by, element } from 'protractor';
That did it for me.
@danyhoron can you open a PR for that? Thank you for the fix!
Thanks for the awesome starter!
When I try to run the e2e tests, I get the following errors, any ideas?:
============ Angular 2 Starter ============ Current environment: development
- env.json is not detected. You can create one on project root
[16:13:13] Using gulpfile ~/PROJECT_PATH/angular2-starter-master/gulpfile.js [16:13:13] Starting 'driver-update'... [16:13:13] I/update - chromedriver: file exists /PROJECT_PATH/angular2-starter-master/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22mac32.zip [16:13:13] I/update - chromedriver: unzipping chromedriver_2.22mac32.zip [16:13:14] I/update - chromedriver: setting permissions to 0755 for /PROJECT_PATH/angular2-starter-master/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22 [16:13:14] I/update - chromedriver: v2.22 up to date [16:13:14] I/update - selenium standalone: file exists /PROJECT_PATH/angular2-starter-master/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar [16:13:14] I/update - selenium standalone: v2.53.1 up to date [16:13:14] Finished 'driver-update' after 999 ms [16:13:14] Starting 'e2e-test'... [16:13:14] Finished 'e2e-test' after 11 ms [16:13:14] Starting 'e2e'... [16:13:14] Finished 'e2e' after 9.24 μs [16:13:14] I/local - Starting selenium standalone server... [16:13:14] I/launcher - Running 1 instances of WebDriver [16:13:14] E/launcher - Server terminated early with status 1 [16:13:14] E/launcher - Error: Server terminated early with status 1 at Error (native) at /PROJECT_PATH/angular2-starter-master/nodemodules/selenium-webdriver/remote/index.js:242:20 at ManagedPromise.invokeCallback (/PROJECT_PATH/angular2-starter-master/nodemodules/selenium-webdriver/lib/promise.js:1379:14) at TaskQueue.execute (/PROJECT_PATH/angular2-starter-master/nodemodules/selenium-webdriver/lib/promise.js:2913:14) at TaskQueue.executeNext (/PROJECT_PATH/angular2-starter-master/node_modules/selenium-webdriver/lib/promise.js:2896:21) at /PROJECT_PATH/angular2-starter-master/node_modules/selenium-webdriver/lib/promise.js:2775:27 at /PROJECT_PATH/angular2-starter-master/node_modules/selenium-webdriver/lib/promise.js:639:7 at process._tickCallback (node.js:366:9) [16:13:14] E/launcher - Process exited with error code 199 [16:13:14] Error running E2E testing
npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/Cellar/node/4.2.1/bin/node" "/usr/local/bin/npm" "run" "e2e" npm ERR! node v4.2.1 npm ERR! npm v3.6.0 npm ERR! code ELIFECYCLE npm ERR! angular2-starter@1.0.0 e2e:
gulp e2e
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular2-starter@1.0.0 e2e script 'gulp e2e'. 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 angular2-starter package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! gulp e2e npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular2-starter npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls angular2-starter npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /PROJECT_PATH/angular2-starter-master/npm-debug.log