Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to load. And 'toggle' causes an error. #1

Closed
yisraeldov opened this issue Apr 22, 2014 · 9 comments
Closed

Doesn't seem to load. And 'toggle' causes an error. #1

yisraeldov opened this issue Apr 22, 2014 · 9 comments

Comments

@yisraeldov
Copy link

Uncaught TypeError: Object #<Object> has no method 'toggle' 
init.coffee:12

And I get this warning before that

Failed to activate package named 'linter' TypeError: Cannot read property 'metadata' of undefined
  at Object.module.exports.activate (/Users/yisraeldov/.atom/packages/linter/lib/init.coffee:18:55)
  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:101:21)
  at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:90:14)
  at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:77:19)
  at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:345: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)
@iam4x
Copy link
Contributor

iam4x commented Apr 28, 2014

Do you have linters installed?

Like linter-jscs or linter-jshint?

@elijahmanor
Copy link

I get the same error and I installed both of the above linters you mentioned.

@iam4x
Copy link
Contributor

iam4x commented May 6, 2014

@elijahmanor Can I have a list of packages you are using? I will try to reproduce this.

@lmartins
Copy link

lmartins commented May 8, 2014

Also having this error with both linters and the coffeescript linter installed.

@martineno
Copy link

I have the same problem on OS X. The problem is that when the linter executes the various commands, the shell commands start with #!/usr/bin/evn node. The env command is supposed to look up the path to node, however, node in this case isn't in the path.

Here is a snippet from the console:

jscs -r checkstyle -c /Users/xxx/project/.jscs.json /var/folders/sf/c_wj68dd0n19v3cdvzg_8ls40000gn/T/11448-22227-114dtd2source.js linter.coffee:41
linter: run linter command linter.coffee:40
/Users/xxx/.atom/packages/linter-jshint/node_modules/jshint/bin/jshint --verbose --extract=auto /var/folders/sf/c_wj68dd0n19v3cdvzg_8ls40000gn/T/11448-22227-114dtd2source.js linter.coffee:41
/bin/sh: jscs: command not found
 linter.coffee:44
env: node: No such file or directory
 linter.coffee:44
/bin/sh: jscs: command not found
 linter.coffee:44
env: node: No such file or directory

In the child process.js, there is a code block

  if (process.platform === 'win32') {
    file = 'cmd.exe';
    args = ['/s', '/c', '"' + command + '"'];
    // Make a shallow copy before patching so we don't clobber the user's
    // options object.
    options = util._extend({}, options);
    options.windowsVerbatimArguments = true;
  } else {
    file = '/bin/sh';
    args = ['-c', command];
  }

That constructs the command line for the process to be run. I think there are two solutions here

  1. Inject the path to the internal node executable that comes with Atom.
  2. Ask the user to specify the path to their node executable in the configuration file.

@hd-deman
Copy link
Contributor

Is it still actual after updates?

@martineno
Copy link

@hd-deman: yeah. I just tested this with the latest version. I deleted it and reinstalled from scratch and the problem still persists.

@hd-deman
Copy link
Contributor

problem with linter-jscs or other linter?

@lmartins
Copy link

For me it is working now. Thanks.

Sent from my iPhone

On 11/05/2014, at 19:57, Dmitry Tsoy notifications@github.com wrote:

problem with linter-jscs or other linter?


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants