FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 638 forks source link

Launching error after fresh install #766

Closed lebrach closed 8 years ago

lebrach commented 8 years ago

Hi there,

I just installed ungit after fresh installation of Git 2.9.0 and Node.js 4.4.7 on Windows 10:

PS C:\Users\lebrach> npm install -g ungit
npm WARN engine forever-monitor@1.1.0: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN deprecated minimatch@0.0.5: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"4.4.7","npm":"2.15.8"})
C:\Users\lebrach\AppData\Roaming\npm\0ungit-credentials-helper -> C:\Users\lebrach\AppData\Roaming\npm\node_modules\
ungit\bin\credentials-helper
C:\Users\lebrach\AppData\Roaming\npm\ungit -> C:\Users\lebrach\AppData\Roaming\npm\node_modules\ungit\bin\ungit
ungit@0.10.2 C:\Users\lebrach\AppData\Roaming\npm\node_modules\ungit
├── os-homedir@1.0.1
├── open@0.0.5
├── crossroads@0.12.2
├── knockout@3.4.0
├── semver@5.1.1
├── signals@1.0.0
├── blueimp-md5@2.3.0
├── cookie-parser@1.4.3 (cookie-signature@1.0.6, cookie@0.3.1)
├── passport-local@1.0.0 (passport-strategy@1.0.0)
├── passport@0.3.2 (pause@0.0.1, passport-strategy@1.0.0)
├── keen.io@0.1.3 (underscore@1.5.2)
├── temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
├── color@0.11.3 (color-convert@1.3.1, clone@1.0.2, color-string@0.3.0)
├── rc@1.1.6 (ini@1.3.4, deep-extend@0.4.1, strip-json-comments@1.0.4, minimist@1.2.0)
├── express-session@1.13.0 (cookie-signature@1.0.6, utils-merge@1.0.0, on-headers@1.0.1, parseurl@1.3.1, cookie@0.2.3, d
epd@1.1.0, crc@3.4.0, uid-safe@2.0.0, debug@2.2.0)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── bluebird@3.3.5
├── serve-static@1.10.3 (escape-html@1.0.3, parseurl@1.3.1, send@0.13.2)
├── diff2html@1.2.0 (diff@2.2.3)
├── body-parser@1.15.2 (content-type@1.0.2, bytes@2.4.0, depd@1.1.0, qs@6.2.0, on-finished@2.3.0, raw-body@2.1.7, http-e
rrors@1.5.0, debug@2.2.0, iconv-lite@0.4.13, type-is@1.6.13)
├── raven@0.11.0 (lsmod@1.0.0, stack-trace@0.0.7, cookie@0.1.0, node-uuid@1.4.7)
├── winston@2.2.0 (cycle@1.0.3, stack-trace@0.0.9, eyes@0.1.8, isstream@0.1.2, async@1.0.0, pkginfo@0.3.1, colors@1.0.3)

├── express@4.13.4 (escape-html@1.0.3, array-flatten@1.1.1, cookie-signature@1.0.6, utils-merge@1.0.0, methods@1.1.2, co
ntent-type@1.0.2, vary@1.0.1, parseurl@1.3.1, cookie@0.1.5, range-parser@1.0.3, fresh@0.3.0, etag@1.7.0, path-to-regexp@
0.1.7, content-disposition@0.5.1, merge-descriptors@1.0.1, depd@1.1.0, qs@4.0.0, on-finished@2.3.0, finalhandler@0.4.1,
debug@2.2.0, proxy-addr@1.0.10, send@0.13.1, type-is@1.6.13, accepts@1.2.13)
├── rimraf@2.5.2 (glob@7.0.5)
├── getmac@1.2.1 (extract-opts@3.3.1)
├── superagent@0.21.0 (extend@1.2.1, cookiejar@2.0.1, methods@1.0.1, mime@1.2.11, component-emitter@1.1.2, reduce-compon
ent@1.0.1, qs@1.2.0, debug@2.2.0, readable-stream@1.0.27-1, form-data@0.1.3, formidable@1.0.14)
├── async@2.0.0-rc.6
├── socket.io@1.4.8 (has-binary@0.1.7, debug@2.2.0, socket.io-parser@2.2.6, socket.io-adapter@0.4.0, engine.io@1.6.11, s
ocket.io-client@1.4.8)
├── yargs@4.7.1 (decamelize@1.2.0, camelcase@3.0.0, y18n@3.2.1, set-blocking@1.0.0, require-main-filename@1.0.1, window-
size@0.2.0, yargs-parser@2.4.0, lodash.assign@4.0.9, cliui@3.2.0, string-width@1.0.1, os-locale@1.4.0, pkg-conf@1.1.3, r
ead-pkg-up@1.0.1)
├── octicons@3.5.0
├── hasher@1.2.0
├── npm-registry-client@7.1.2 (chownr@1.0.1, graceful-fs@4.1.4, slide@1.1.6, retry@0.8.0, once@1.3.3, npm-package-arg@4.
2.0, concat-stream@1.5.1, normalize-package-data@2.3.5, npmlog@3.1.2, request@2.72.0)
├── snapsvg@0.4.0 (eve@0.4.2)
├── forever-monitor@1.1.0 (watch@0.5.1, pkginfo@0.4.0, minimatch@0.0.5, utile@0.1.7, ps-tree@0.0.3, broadway@0.2.10)
├── moment@2.13.0
└── lodash@4.12.0
PS C:\Users\lebrach>

And got following error when launching ungit:

PS C:\Users\lebrach> ungit
module.js:327
    throw err;
    ^

Error: Cannot find module 'npm'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\lebrach\AppData\Roaming\npm\node_modules\ungit\src\sysinfo.js:10:11)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

Don't know what to do do now...

Any help would be appreciated :-)

Lebrac'h

AlexGenK commented 8 years ago

Same trouble on Win 7 x64, Git 2.7.4, Node.js 4.4.1

Ungit 0.10.1 works OK

lebrach commented 8 years ago

I have uninstalled 0.10.2 and reinstalled 0.10.1 and it works fine!

Where's the bug?

Lebrac'h

jung-kim commented 8 years ago

Wow, does windows node not come with npm? I guess it is my fault for not checking the deps...

lfx commented 8 years ago

@codingtwinky does it comes with other systems? Last time I had to install npm on Mac as well (~3 months ago).

jung-kim commented 8 years ago

I haven't had fresh node install in a clean env in very long time but I thought it was packaged together? I don't remember installing them separately...

lebrach commented 8 years ago

@codingtwinky and @lfx issue regarding this thread doesn't come from npm, I guess... I can confirm that npm IS packaged with node.js on Windows...

Problem certainly comes from new ungit 0.10.2 release as 0.10.1 works perfectly!

What does @FredrikNoren think about this?

jung-kim commented 8 years ago

@lebrach Thanks for reporting and it seems that this is still an issue.Maybe this thread can help us?

AlexGenK commented 8 years ago

manual installing fresh version npm solves this issue npm install -g npm

lfx commented 8 years ago

@AlexGenK which version did you have before fresh install?

AlexGenK commented 8 years ago

@lfx 2.14.21. Now - 3.10.3

jung-kim commented 8 years ago

I think npm is installed but cannot be found either due to path config is not configured or something like that. by doing npm install -g npm, I guess you are installing a second version of npm and that gets included in path and thus fixing the problem... npm install -g npm is little oxymoronic and I would have to find a better option but I guess it can be a work around for now...

I'm about to head out for a 2 weeks long vacation so I don't have a time to take a look at it but if this is not fixed by then I will jump on this...

lfx commented 8 years ago

@codingtwinky Just installed node on ubuntu server. Npm had to be installed separately. Have a relaxing one! 👍

FredrikNoren commented 8 years ago

Thanks for digging in everyone. I'll cut a new version and get this fix out now.

FredrikNoren commented 8 years ago

Ok, 0.10.3 is now out. I'll close this thread for now assuming the fix fixed the issue, but re-open if it didn't.