yujinakayama / atom-lint

Obsolete: Generic code linting support for Atom
https://atom.io/packages/atom-lint
MIT License
111 stars 33 forks source link

Atom-lint errors on js files #67

Closed deiga closed 10 years ago

deiga commented 10 years ago
Failed to activate package named 'atom-lint' TypeError: Cannot call method 'append' of undefined
  at LintView.module.exports.LintView.initialize (/Users/timosand/.atom/packages/atom-lint/lib/lint-view.coffee:16:27)
  at LintView.View (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/lib/space-pen.js:135:25)
  at new LintView (/Users/timosand/.atom/packages/atom-lint/lib/lint-view.coffee:11:3)
  at Object.module.exports.injectLintViewIntoEditorView (/Users/timosand/.atom/packages/atom-lint/lib/atom-lint.coffee:54:20)
  at /Users/timosand/.atom/packages/atom-lint/lib/atom-lint.coffee:20:8
  at WorkspaceView.module.exports.WorkspaceView.eachEditorView (/Applications/Atom.app/Contents/Resources/app/src/workspace-view.js:478:9)
  at Object.module.exports.enable (/Users/timosand/.atom/packages/atom-lint/lib/atom-lint.coffee:19:50)
  at Object.module.exports.activate (/Users/timosand/.atom/packages/atom-lint/lib/atom-lint.coffee:10:6)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:161:27)
  at /Applications/Atom.app/Contents/Resources/app/src/package.js:147:28
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:95:15)
  at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:141:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:109:21)
  at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:98:14)
  at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:85:19)
  at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:349:21)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:14:8)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:20:4)
  at Module._compile (module.js:455:26)
  at Object.Module._extensions..js (module.js:473:10)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:20:5)
elrolito commented 10 years ago

Did you turn on the React Editor option? I know it's still pretty buggy with a bunch of modules.

nijikokun commented 10 years ago

Sigh... turned on react editor option, and this plugin broke.

Should be pretty high priority, it's a much smoother experience, it's also going to be the default editor soon.

deiga commented 10 years ago

Yeah, the React editor was the culprit.

elrolito commented 10 years ago

I've started some work on getting this to work with the React editor on my fork, but it's not ready yet/pushed. I'll put in a PR once it's ready.

yujinakayama commented 10 years ago

@elrolito Thanks for the help!

yujinakayama commented 10 years ago

@elrolito Any progress on the React support? If not, I'll start working on it.

elrolito commented 10 years ago

Unfortunately no, I’ve been caught up with a major project at work…

Good luck! I guess the module API has been updated, so that will help a lot.

On Jul 24, 2014, at 12:47 PM, Yuji Nakayama notifications@github.com wrote:

@elrolito Any progress on the React support? If not, I'll start working on it.

— Reply to this email directly or view it on GitHub.

yujinakayama commented 10 years ago

Hmm, it seems that this issue is already fixed by some compatibility improvements (introduced after this issue was posted) in Atom.

The original error:

Failed to activate package named 'atom-lint' TypeError: Cannot call method 'append' of undefined
  at LintView.module.exports.LintView.initialize (/Users/timosand/.atom/packages/atom-lint/lib/lint-view.coffee:16:27)

was caused by the absence of overlayer property in ReactEditorView which is used instead of EditorView when the Use React Editor option is checked. However, after that, .overlayer class DOM element and overlayer property have been added to ReactEditorView so that packages which rely on it can work with React editor:

So now there's no need for the explicit React support to make atom-lint work properly since DOMs generated by React and DOMs generated by jQuery (or anything else) can coexist. Though there's a room for performance improvement with the native React support and I'm working on it.

If you still reproduce this issue, please reopen it.