angular-phonecat icon indicating copy to clipboard operation
angular-phonecat copied to clipboard

Issue with bower

Open bparrish opened this issue 12 years ago • 83 comments

Having an issue with Bower at the beginning of the tutorial.. here is the log file:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose node symlink C:\Program Files\nodejs\node.exe 5 verbose run-script [ 'prestart', 'start', 'poststart' ] 6 info prestart [email protected] 7 verbose unsafe-perm in lifecycle true 8 info [email protected] Failed to exec prestart script 9 error [email protected] prestart: npm install 9 error Exit status 1 10 error Failed at the [email protected] prestart script. 10 error This is most likely a problem with the angular-phonecat package, 10 error not with npm itself. 10 error Tell the author that this fails on your system: 10 error npm install 10 error You can get their info via: 10 error npm owner ls angular-phonecat 10 error There is likely additional logging output above. 11 error System Windows_NT 6.2.9200 12 error command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 13 error cwd D:\Dev\AngularDevelopment\angular-phonecat 14 error node -v v0.10.28 15 error npm -v 1.4.9 16 error code ELIFECYCLE 17 verbose exit [ 1, true ]

bparrish avatar Jun 03 '14 21:06 bparrish

What happens if you run npm install?

petebacondarwin avatar Jun 03 '14 21:06 petebacondarwin

it hangs for a small second, and then gets to bower install and stops

So i try npm start again and get this to the console:

npm ERR! [email protected] postinstall: bower install npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is most likely a problem with the angular-phonecat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! bower install npm ERR! You can get their info via: npm ERR! npm owner ls angular-phonecat npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! cwd D:\Dev\AngularDevelopment\ang2\angular-phonecat npm ERR! node -v v0.10.28 npm ERR! npm -v 1.4.9 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! D:\Dev\AngularDevelopment\ang2\angular-phonecat\npm-debug.log npm ERR! not ok code 0

npm ERR! [email protected] prestart: npm install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] prestart script. npm ERR! This is most likely a problem with the angular-phonecat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm install npm ERR! You can get their info via: npm ERR! npm owner ls angular-phonecat npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod ejs\node_modules\npm\bin\npm-cli.js" "start" npm ERR! cwd D:\Dev\AngularDevelopment\ang2\angular-phonecat npm ERR! node -v v0.10.28 npm ERR! npm -v 1.4.9 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! D:\Dev\AngularDevelopment\ang2\angular-phonecat\npm-debug.log npm ERR! not ok code 0

Directories are different because I wanted to try a new directory

bparrish avatar Jun 03 '14 22:06 bparrish

OK, so how about running:

node_modules\.bin\bower install

petebacondarwin avatar Jun 03 '14 22:06 petebacondarwin

I get no output to the console, same error after running npm start again

bparrish avatar Jun 03 '14 22:06 bparrish

Can you try installing bower globally:

npm install -g bower

Then running it directly:

bower install

There have been issues where bower cannot access Github.

petebacondarwin avatar Jun 03 '14 22:06 petebacondarwin

globally installed just fine, running bower install did not put anything to the console

bparrish avatar Jun 03 '14 22:06 bparrish

Hmm. Did anything get installed in app\bower_components? I've got to go offline. I'll see if I can help further tomorrow.

petebacondarwin avatar Jun 03 '14 22:06 petebacondarwin

yeah looks like that directory is populated

bparrish avatar Jun 03 '14 22:06 bparrish

I'm not sure what to say. It is unclear what is actually failing...

petebacondarwin avatar Jun 04 '14 15:06 petebacondarwin

if this helps, here are my defaults:

D:\Dev\jQuery\jquery>npm config ls -l ; cli configs long = true registry = "https://registry.npmjs.org/" user-agent = "npm/1.4.9 node/v0.10.28 win32 x64"

; builtin config undefined prefix = "C:\Users\Ben\AppData\Roaming\npm"

; default values always-auth = false bin-links = true browser = null ca = null cache = "C:\Users\Ben\AppData\Roaming\npm-cache" cache-lock-retries = 10 cache-lock-stale = 60000 cache-lock-wait = 10000 cache-max = null cache-min = 10 cert = null color = true depth = null description = true dev = false editor = "notepad.exe" email = "" engine-strict = false fetch-retries = 2 fetch-retry-factor = 10 fetch-retry-maxtimeout = 60000 fetch-retry-mintimeout = 10000 force = false git = "git" git-tag-version = true global = false globalconfig = "C:\Users\Ben\AppData\Roaming\npm\etc\npmrc" globalignorefile = "C:\Users\Ben\AppData\Roaming\npm\etc\npmignore" group = 0 heading = "npm" https-proxy = null ignore-scripts = false init-module = "C:\Users\Ben.npm-init.js" init.author.email = "" init.author.name = "" init.author.url = "" init.license = "ISC" json = false key = null link = false local-address = undefined loglevel = "http" ; long = false (overridden) message = "%s" node-version = "v0.10.28" npat = false onload-script = false optional = true parseable = false ; prefix = "C:\Program Files\nodejs" (overridden) production = false proprietary-attribs = true proxy = null rebuild-bundle = true registry = "https://registry.npmjs.org/" rollback = true save = false save-bundle = false save-dev = false save-exact = false save-optional = false save-prefix = "^" searchexclude = null searchopts = "" searchsort = "name" shell = "C:\Windows\system32\cmd.exe" shrinkwrap = true sign-git-tag = false strict-ssl = true tag = "latest" tmp = "C:\Users\Ben\AppData\Local\Temp" umask = 18 unicode = true unsafe-perm = true usage = false user = 0 ; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overri dden) userconfig = "C:\Users\Ben.npmrc" username = "" version = false versions = false viewer = "browser"

bparrish avatar Jun 04 '14 20:06 bparrish

Also if it helps, here is the package.json

{ "version": "0.0.0", "private": true, "name": "angular-phonecat", "description": "A tutorial application for AngularJS", "repository": "https://github.com/angular/angular-phonecat", "license": "MIT", "devDependencies": { "karma": "~0.10", "protractor": "~0.20.1", "http-server": "^0.6.1", "bower": "^1.3.1", "shelljs": "^0.2.6" }, "scripts": { "postinstall": "bower install",

"prestart": "npm install",
"start": "http-server -p 8000",

"pretest": "npm install",
"test": "karma start test/karma.conf.js",
"test-single-run": "karma start test/karma.conf.js  --single-run",

"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",

"preprotractor": "npm run update-webdriver",
"protractor": "protractor test/protractor-conf.js",

"update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + cat('bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""

} }

bparrish avatar Jun 05 '14 02:06 bparrish

also if it helps, I have cygwin on my computer and am to use those commands through windows CMD... From the research I have done, I know that cygwin and nodejs and play nice together (examples from my experience). I do not really want to uninstall cygwin. I have also tried installing Console2. as suggested here: http://stackoverflow.com/a/17416869/1888585, somehow I got it to work ONCE last night with Console2, but now I have no idea on what I did to make it work.

Any suggestions would be fantastic

-bparrish

bparrish avatar Jun 05 '14 23:06 bparrish

Got the same issue ;/

kamilklosowski avatar Jun 10 '14 15:06 kamilklosowski

ive done: npm install http-server -g

and then i've got:

(...)

[email protected] start /Users/kamilklosowski/Dropbox/Nauka/angular-phonecat

http-server -p 8000

events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at errnoException (net.js:901:11) at Server._listen2 (net.js:1039:14) at listen (net.js:1061:10) at net.js:1135:9 at dns.js:72:18 at process._tickCallback (node.js:415:13) at Function.Module.runMain (module.js:499:11) at startup (node.js:119:16) at node.js:901:3 npm ERR! weird error 8 npm ERR! not ok code 0

kamilklosowski avatar Jun 10 '14 16:06 kamilklosowski

EADDRINUSE means that you already have a server hosting a website at port 8000.

On 10 June 2014 17:08, kamilklosowski [email protected] wrote:

ive done: npm install http-server -g

and then i've got:

(...)

[email protected] start /Users/kamilklosowski/Dropbox/Nauka/angular-phonecat

http-server -p 8000

events.js:72 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at errnoException (net.js:901:11) at Server._listen2 (net.js:1039:14) at listen (net.js:1061:10) at net.js:1135:9 at dns.js:72:18 at process._tickCallback (node.js:415:13) at Function.Module.runMain (module.js:499:11) at startup (node.js:119:16) at node.js:901:3 npm ERR! weird error 8

npm ERR! not ok code 0

—

Reply to this email directly or view it on GitHub https://github.com/angular/angular-phonecat/issues/163#issuecomment-45634865 .

petebacondarwin avatar Jun 10 '14 16:06 petebacondarwin

Oh yes. I didn't stopped another http server. Thanks @petebacondarwin :)

Regardless of that - a few tries before i've kill all hosting processes and still got that http-server error. So whoever encountered same problem (as me and OP): npm install http-server -g (and/or npm install karma -g) Should do the trick.

kamilklosowski avatar Jun 10 '14 16:06 kamilklosowski

@petebacondarwin I have the EXACT same problem with bparrish. I am running it with Git Bash. Can we find a solution for this? I really want to continue with the tutorial and I'm stuck.

avadolas avatar Jun 15 '14 11:06 avadolas

Same thing happens also after cloning angular-seed repository when I try npm install. It comes to bower install, and then fails with the same issue as above. Tried it with Git Bash and Windows cmd.

avadolas avatar Jun 16 '14 09:06 avadolas

Has this issue been solved? I'm running into the same issue with bower install failing on my system.

yosriady avatar Jun 26 '14 18:06 yosriady

My only solution was to just use a clean vm with nothing on it. so a work around really...

bparrish avatar Jun 26 '14 18:06 bparrish