Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

'npm start' error with protractor #325

Closed
scottcarlton opened this issue Dec 19, 2016 · 24 comments · Fixed by #330
Closed

'npm start' error with protractor #325

scottcarlton opened this issue Dec 19, 2016 · 24 comments · Fixed by #330

Comments

@scottcarlton
Copy link

scottcarlton commented Dec 19, 2016

Trying to run quickstart npm start and get the following on Mac Pro Sierra v10.12.1.
npm -v // 3.10.9
tsc -v // 2.1.4

I can run npm lite and server starts up, but any cli common with tsc (npm tsc, npm tsc:w) gets the errors below. I can run tsc outside the quickstart dir and everything works fine. I checked my node_modules permissions and seems correct. Any suggestions? Thanks

node_modules/protractor/built/browser.d.ts(260,37): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(267,55): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(267,78): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(358,31): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(369,26): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(425,36): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/ptor.d.ts(13,29): error TS2503: Cannot find namespace 'webdriver'.

@JPCortesP
Copy link

I was oppening a new issue on this, good thing that I didn't. Just updated Node and NPM just in case but the error is still there.

@jts-code
Copy link

jts-code commented Dec 19, 2016

I am experiencing a similar error on Windows.

C:\quickstart>npm start

> angular-quickstart@1.0.0 start C:\quickstart
> tsc && concurrently "tsc -w" "lite-server"

node_modules/protractor/built/browser.d.ts(260,37): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(267,55): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(267,78): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(358,31): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(369,26): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/browser.d.ts(425,36): error TS2503: Cannot find namespace 'webdriver'.
node_modules/protractor/built/ptor.d.ts(13,29): error TS2503: Cannot find namespace 'webdriver'.

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 start: `tsc && concurrently "tsc -w" "lite-server" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 start script 'tsc && concurrently "tsc -w" "lite-server" '.
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 angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     tsc && concurrently "tsc -w" "lite-server"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\dewey\src\quickstart\npm-debug.log

@abductedMind
Copy link

Exact same problem here.

@nickJones67
Copy link

instead of
>npm start
try
>npm run lite

@abductedMind
Copy link

@nickJones67 That runs, but please explain why.

@JPCortesP
Copy link

@nickJones67 it works, however, the *.ts aren't updating the *.js...

@nickJones67
Copy link

nickJones67 commented Dec 20, 2016

@abductedMind Not sure. I discovered it on this issue discussion
@JPCortesP Yes this a pretty big problem.

@JPCortesP
Copy link

I managed to get it running using two terminal windows, one with npm run tsc:w other with npm run lite

@filipesilva
Copy link
Contributor

This seems to be related with a @types problem. Can you try using this exact one?

@types/selenium-webdriver@2.53.33

@JPCortesP
Copy link

@filipesilva it works now. Wonder what's the inner problem with the newer version?

@filipesilva
Copy link
Contributor

Not too sure myself but @cnishina is working on it I believe.

@ramiromd
Copy link

ramiromd commented Dec 20, 2016

Same problem using Debian 8.6.0 Jessie.

$ node -v
v6.9.1

$ npm -v
3.10.8

@daintym0sh
Copy link

@nickJones67 thanks for your help >npm run lite works.. i've been confused for an hour!

@Lloydinator
Copy link

Man this was driving me mad for an hour, especially after seeing npm run lite run (but without my controllers working). Tried installing selenium manually and same thing. So glad I stopped by here. Thanks so much @filipesilva. Hope this thing is resolved soon.

@daintym0sh
Copy link

If anyone is still confused,

change the following in package.json

"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" "
to
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" "

reference: http://stackoverflow.com/questions/34335340/angular2-quickstart-npm-start-is-not-working-correctly

@scottcarlton
Copy link
Author

scottcarlton commented Dec 20, 2016

@daintym0sh thanks changing that npm start seems to work. Though those errors still persist, but doesn't seem to effect the build.

6:11:24 PM - File change detected. Starting incremental compilation...
[0] node_modules/protractor/built/browser.d.ts(260,37): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/browser.d.ts(267,55): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/browser.d.ts(267,78): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/browser.d.ts(358,31): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/browser.d.ts(369,26): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/browser.d.ts(425,36): error TS2503: Cannot find namespace 'webdriver'.
[0] node_modules/protractor/built/ptor.d.ts(13,29): error TS2503: Cannot find namespace 'webdriver'.
[0] 6:11:25 PM - Compilation complete. Watching for file changes.
[1] [BS] File changed: app/app.component.js

@andresrinivasan
Copy link

Per @filipesilva, rather than modify package.json, use a specific version of selenium-webdriver:

npm install @types/selenium-webdriver@2.53.33

@jts-code
Copy link

Can confirm that on Windows the only needed change is changing this line package.json from

    "@types/selenium-webdriver": "^2.53.33"

to

    "@types/selenium-webdriver": "2.53.33"

Then an npm install and npm start should work like normal.

👏 @filipesilva @andresrinivasan

@scottcarlton
Copy link
Author

@jtdewey can confirm this solution working on Mac too. Thanks! @filipesilva @andresrinivasan

@scottcarlton
Copy link
Author

Going to close this issue for now.

@filipesilva
Copy link
Contributor

filipesilva commented Dec 20, 2016

Just to let people know, a fix is in the works on angular/protractor#3848.

@filipesilva
Copy link
Contributor

I'm going to reopen this since more people are opening new issues to report it.

@filipesilva filipesilva reopened this Dec 20, 2016
This was referenced Dec 20, 2016
filipesilva added a commit that referenced this issue Dec 20, 2016
When angular/protractor#3848 is ready it should fix the webdriver types issues, and the pinning can be reverted.

The zone.js problem is being tracked on angular/zone.js#554.

Fix #325
filipesilva added a commit that referenced this issue Dec 20, 2016
When angular/protractor#3848 is ready it should fix the webdriver types issues, and the pinning can be reverted.

The zone.js problem is being tracked on angular/zone.js#554.

Fix #325
@memento
Copy link

memento commented Jan 20, 2017

This trick didn't work for me (Ubuntu 14.04 )

Can confirm that on Windows the only needed change is changing this line package.json from

"@types/selenium-webdriver": "^2.53.33"

to

"@types/selenium-webdriver": "2.53.33"

Then an npm install and npm start should work like normal.

I had to use this command to start :

npm run lite

I have npm version 4.1.1

@ghost
Copy link

ghost commented Jun 1, 2017

Try npm run serve

talent-programmer pushed a commit to talent-programmer/angular-quickstart that referenced this issue Nov 30, 2023
When angular/protractor#3848 is ready it should fix the webdriver types issues, and the pinning can be reverted.

The zone.js problem is being tracked on angular/zone.js#554.

Fix angular/quickstart#325
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.