atom-minimap / minimap-git-diff

A minimap binding for the atom git-diff package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught Error: Cannot find module '/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff'

pencilcheck opened this issue · comments

Uncaught Error: Cannot find module '/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff'

Atom Version: 0.156.0
System: Mac OS X 10.10.2
Thrown From: minimap-git-diff package, v3.0.11

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At module.js:346

Error: Cannot find module '/Applications/Atom.app/Contents/Resources/app/node_modules/git-diff'
  at Module._resolveFilename (module.js:344:15)
  at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:380:52)
  at Function.Module._load (module.js:286:25)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at new MinimapGitDiffBinding (/Users/penn/.atom/packages/minimap-git-diff/lib/minimap-git-diff-binding.coffee:13:6)
  at /Users/penn/.atom/packages/minimap-git-diff/lib/minimap-git-diff.coffee:56:50
  at createdCallback (/Users/penn/.atom/packages/minimap/lib/mixins/view-management.coffee:53:40)
  at Emitter.module.exports.Emitter.emit (/Users/penn/.atom/packages/minimap/node_modules/event-kit/lib/emitter.js:71:11)
  at Minimap.module.exports.ViewManagement.onEditorAdded (/Users/penn/.atom/packages/minimap/lib/mixins/view-management.coffee:110:14)
  at /Users/penn/.atom/packages/minimap/lib/mixins/view-management.coffee:85:37

/cc @atom/core

It's not possible that the version that raised that error is v3.0.11, here's why:

The stack trace says that the error come from a call to require made line 13 of the binding file:

at require (module.js:392:17)
 at new MinimapGitDiffBinding (/Users/penn/.atom/packages/minimap-git-diff/lib/minimap-git-diff-binding.coffee:13:6)

This is the line number 13 in v3.0.11:

@subscriptions = new CompositeDisposable

https://github.com/abe33/minimap-git-diff/blob/v3.0.11/lib/minimap-git-diff-binding.coffee#L13

No require!

Have you at least tried the solution provided in the issue you linked in your last comment (uninstall/reinstall)?

That's what I did, and that's why it says 3.0.11 because before it was 3.0.4 (if I remember correctly)

hmm... Have you tried restart Atom after that? Maybe the runtime code wasn't updated.

Hm, restarting does fix the issue. Atom seems to still be loading the old code right after I update.

Yes, I had this issue with several other packages, I guess the module caching system doesn't play nice with updates.