Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

npm start on Windows fails at running testapp #1227

Closed
mitchhentges opened this issue Aug 22, 2014 · 2 comments
Closed

npm start on Windows fails at running testapp #1227

mitchhentges opened this issue Aug 22, 2014 · 2 comments

Comments

@mitchhentges
Copy link

When attempting to start up Protractor using npm start, I get an error that "'testapp' is not recognized as an internal or external command, operable program or batch file."

To reproduce on a Windows machine:
1: Clone the protractor repo
2: Enter the protractor directory in a command console
3: In a separate window, fire up a selenium server according to the For Contributors instructions
4: npm install
5: npm start

The entire error information is:

> [email protected] start C:\Users\mhentges\Documents\protractor
> testapp/scripts/web-server.js

'testapp' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! [email protected] start: `testapp/scripts/web-server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the protractor package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     testapp/scripts/web-server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls protractor
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\Users\mhentges\Documents\protractor
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\mhentges\Documents\protractor\npm-debug.log
npm ERR! not ok code 0

Here's a fun thing: running npm list | find "testapp" shows nothing, as though testapp isn't installed.
If I do: npm install testapp, it installs version 0.0.0, which doesn't actually exist. The full output of the command is:

npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/testapp
npm http 304 https://registry.npmjs.org/testapp
[email protected] node_modules\testapp
@juliemr
Copy link
Member

juliemr commented Aug 22, 2014

The testapp is in the 'testapp' folder and windows isn't recognizing the path properly - I apologize for the difficulty here, contributor-specific code isn't really optimized for windows. I think that it's just failing on running 'testapp/scripts/web-server.js'.

You can get around this by manually running node testapp/scripts/web-server.js

@mitchhentges
Copy link
Author

I can verify, I could do all test-related fun by invoking
node testapp\scripts\web-server.js, followed by
node scripts\test.js
Awesome, thanks Julie

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

No branches or pull requests

2 participants