Slava / tern-meteor-sublime

Meteor Framework autocompletion for Sublime
244 stars 10 forks source link

Failed to start server error #12

Closed Morganjackson closed 9 years ago

Morganjackson commented 9 years ago

Has anyone come across this error before?

screen shot 2015-04-12 at 1 18 39 pm

Slava commented 9 years ago

This happens when your project is way too big and Node tries to open all these files to analyze.

On your OS, you can bump the limit of max open files from 256 to something higher: http://stackoverflow.com/questions/8965606/node-and-error-emfile-too-many-open-files

StanLindsey commented 8 years ago

So, I've used a variety of methods to increase my max open limit, even up to 1024 from 256 using LaunchCTL. The error still appears.

The link you suggested @Slava says to move to graceful-fs - why don't we do that and solve all this.

lnmunhoz commented 8 years ago

@StanLindsey Did you fix it?

StanLindsey commented 8 years ago

Yeah, I think so. Though it sort of needs more testing. Try it out as follows:

  1. Remove Slava's version of the package from sublime
  2. Find your Sublime Text packages path by opening the Sublime Console (Ctrl+) and running: sublime.packages_path()`
  3. Cd in and clone to your package path and clone my repo, until this is added to Slava's. $ cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages $ git clone https://github.com/StanLindsey/tern-meteor-sublime.git Stan-Tern-Meteor
  4. cd Stan-Tern-Meteor && npm install
  5. Restart Sublime

Let me know if any issues.

lnmunhoz commented 8 years ago

It was missing npm install, but after that, works! +1 @StanLindsey Thanks!

maddijoyce commented 8 years ago

Just for clarity's sake, I think that should be cd Stan-Tern-Meteor && npm install

Thanks for the fix @StanLindsey

arvi commented 8 years ago

I tried @StanLindsey's solution but I'm still getting the error even after restarting Sublime editor.

screen shot 2016-06-26 at 11 14 13 pm

I've inspected the package.json file:

{
  "name": "tern_for_sublime",
  "license": "MIT",
  "version": "0.4.0",
  "author": "Marijn Haverbeke <marijnh@gmail.com>",
  "description": "Sublime Text package for Tern",
  "repository": {
    "type": "git",
    "url": "git://github.com/marijnh/tern_for_sublime.git"
  },
  "dependencies": {
    "graceful-fs": "^4.1.3",
    "tern": ">=0.5"
  }
}

Meteor version: 1.3.4.1 NPM version: 2.1.18 Machine: OSX El Capitan 10.11.3

I've also added this in my Settings - User as mentioned in the documentation.

    "auto_complete_triggers":
    [
        { "characters": "<", "selector": "text.html" },
        { "characters": ".", "selector": "source.js" }
    ]

I'm not sure what I missed.

Thanks :smile:

HintikkaKimmo commented 8 years ago

Followed the instructions provided by @StanLindsey and thanks for those but it does not seem to fix this. I can see that graceful-fs is now installed but I continue to get the same error.

Only difference is that now I get the error 2 x every time once from TernJS and once from the Stan-TernJS

mikeygcooper commented 8 years ago

The fix provided by @StanLindsey does not work for me either :(

arvi commented 8 years ago

I had no choice but to uninstall it for the meantime since everytime I time I type F (trying to type FlowRouter) this error keeps popping up. I'm not sure how others made it work.

curlynux commented 8 years ago

hi, i solved the issue by installing TernJS mannualy with npm like this sudo npm -g install tern and after that i cd to my project and type tern to start the server after that i just opened i new terminal

ctrl + alt + t

and cd again to my project then typed subl ../my_project to open sublime with my project folder. i try to test the package by typed many js function and meteor methods all worked nicely no error popping up. yes it's fastidious all ways do that but it's work fine for now so the author or community have to solve the issue thank you and have a nice day/night

sdwager commented 8 years ago

https://jaredbarriere.wordpress.com/2016/08/02/sublime-text-3-meteor-auto-complete-ternjs/

This worked for me.

nunohvidal commented 7 years ago

@sdwager suggestion worked for me

https://jaredbarriere.wordpress.com/2016/08/02/sublime-text-3-meteor-auto-complete-ternjs/

Nikitozz13 commented 7 years ago

@sdwager suggestion works for me too. macOS Sierra 10.12.5 (16F73)

https://jaredbarriere.wordpress.com/2016/08/02/sublime-text-3-meteor-auto-complete-ternjs/

With terminal go to cd Users/<YOUR_USERNAME>/Library/Application\ Support/Sublime\ Text\ 3/Packages/Meteor\ Autocomplete\ \(TernJS\)/node_modules/tern/bin/ And modify tern file like described in link above

martianmartian commented 7 years ago

just remove the silly ternjs