{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/515","labels_url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/515/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/515/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/515/events","html_url":"https://github.com/phonegap/phonegap-cli/issues/515","id":55162301,"number":515,"title":"Crash Bug: Clean install of node (latest) and phonegap fails","user":{"login":"klh","id":596813,"avatar_url":"https://avatars.githubusercontent.com/u/596813?v=3","gravatar_id":"","url":"https://api.github.com/users/klh","html_url":"https://github.com/klh","followers_url":"https://api.github.com/users/klh/followers","following_url":"https://api.github.com/users/klh/following{/other_user}","gists_url":"https://api.github.com/users/klh/gists{/gist_id}","starred_url":"https://api.github.com/users/klh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klh/subscriptions","organizations_url":"https://api.github.com/users/klh/orgs","repos_url":"https://api.github.com/users/klh/repos","events_url":"https://api.github.com/users/klh/events{/privacy}","received_events_url":"https://api.github.com/users/klh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phonegap/phonegap-cli/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"mwbrooks","id":21328,"avatar_url":"https://avatars.githubusercontent.com/u/21328?v=3","gravatar_id":"","url":"https://api.github.com/users/mwbrooks","html_url":"https://github.com/mwbrooks","followers_url":"https://api.github.com/users/mwbrooks/followers","following_url":"https://api.github.com/users/mwbrooks/following{/other_user}","gists_url":"https://api.github.com/users/mwbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/mwbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwbrooks/subscriptions","organizations_url":"https://api.github.com/users/mwbrooks/orgs","repos_url":"https://api.github.com/users/mwbrooks/repos","events_url":"https://api.github.com/users/mwbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/mwbrooks/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/phonegap/phonegap-cli/milestones/34","html_url":"https://github.com/phonegap/phonegap-cli/milestones/Improve%20Installation%20Experience","labels_url":"https://api.github.com/repos/phonegap/phonegap-cli/milestones/34/labels","id":1306886,"number":34,"title":"Improve Installation Experience","description":"","creator":{"login":"mwbrooks","id":21328,"avatar_url":"https://avatars.githubusercontent.com/u/21328?v=3","gravatar_id":"","url":"https://api.github.com/users/mwbrooks","html_url":"https://github.com/mwbrooks","followers_url":"https://api.github.com/users/mwbrooks/followers","following_url":"https://api.github.com/users/mwbrooks/following{/other_user}","gists_url":"https://api.github.com/users/mwbrooks/gists{/gist_id}","starred_url":"https://api.github.com/users/mwbrooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwbrooks/subscriptions","organizations_url":"https://api.github.com/users/mwbrooks/orgs","repos_url":"https://api.github.com/users/mwbrooks/repos","events_url":"https://api.github.com/users/mwbrooks/events{/privacy}","received_events_url":"https://api.github.com/users/mwbrooks/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-09-15T17:43:42Z","updated_at":"2015-09-16T18:27:57Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-01-22T14:54:55Z","updated_at":"2015-09-18T06:21:14Z","closed_at":null,"body":"install fails due to wrong subtree initialization on /use/local/lib/node_modules/phonegap/node_modules/cordova\r\n\r\nspecifically cordova_lib is not installed in the subtree and causes module.js to throw an error in index.js\r\n\r\n     /usr/local/lib/node_modules/phonegap on git:master o [15:48:16]\r\n     $ phonegap\r\n     \r\n     module.js:340\r\n         throw err;\r\n               ^\r\n     Error: Cannot find module '../../node_modules/cordova/node_modules/cordova-lib'\r\n         at Function.Module._resolveFilename (module.js:338:15)\r\n         at Function.Module._load (module.js:280:25)\r\n         at Module.require (module.js:364:17)\r\n         at require (module.js:380:17)\r\n         at Object.<anonymous> (/usr/local/lib/node_modules/phonegap/lib/cordova/index.js:16:26)\r\n         at Module._compile (module.js:456:26)\r\n         at Object.Module._extensions..js (module.js:474:10)\r\n         at Module.load (module.js:356:32)\r\n         at Function.Module._load (module.js:312:12)\r\n         at Module.require (module.js:364:17)\r\n\r\n\r\ntemporary fix:\r\n\r\ndo `npm install cordova-lib` inside cordova/ to add cordova-lib under node_modules"},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/comments/141355705","html_url":"https://github.com/phonegap/phonegap-cli/issues/515#issuecomment-141355705","issue_url":"https://api.github.com/repos/phonegap/phonegap-cli/issues/515","id":141355705,"user":{"login":"balkantechnologies","id":12758421,"avatar_url":"https://avatars.githubusercontent.com/u/12758421?v=3","gravatar_id":"","url":"https://api.github.com/users/balkantechnologies","html_url":"https://github.com/balkantechnologies","followers_url":"https://api.github.com/users/balkantechnologies/followers","following_url":"https://api.github.com/users/balkantechnologies/following{/other_user}","gists_url":"https://api.github.com/users/balkantechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/balkantechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balkantechnologies/subscriptions","organizations_url":"https://api.github.com/users/balkantechnologies/orgs","repos_url":"https://api.github.com/users/balkantechnologies/repos","events_url":"https://api.github.com/users/balkantechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/balkantechnologies/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T06:21:14Z","updated_at":"2015-09-18T06:21:14Z","body":"I was using node 4.0.0 with the default npm belonging to that version, I don't recall the exact version number. \r\n\r\nNow I'm using node v0.12.7 with npm v2.11.3 and the problem disappeared.\r\n\r\nThis solved the problem for me on both Ubuntu and on OS/X. The node 4.0.0 installation was a fresh one installed via NVM, yet I got this problem, so I have the impression that this problem might be connected to the nodejs or npm version. As I said: on 0.12.7 it works all fine."}}