lamabiker / atom-ember-cli-helper

Ember CLI integration for the Atom editor
https://atom.io/packages/ember-cli-helper
MIT License
26 stars 13 forks source link

Unable to start server #1

Closed YomeKatsuma closed 10 years ago

YomeKatsuma commented 10 years ago

While using a simple "foo" project (built with ember cli, i.e. using terminal command), i was not able to start the server.

Having the following error :

'Uncaught Error: spawn ENOENT '

See screenshot :+1: capture decran 2014-05-11 a 12 58 19

alexlafroscia commented 10 years ago

Hey, can I get more information about how you're launching the project? I know that you said you weren't launching it from the command line with the atom command and that you were using the Dock. I tried launching Atom that was, then opening the project manually by going to File > Open and selecting the folder for the project, but even under those circumstances the server command worked fine.

YomeKatsuma commented 10 years ago

Hi Alex,

Actually :

I've also re-install Node/npm and so with no 'sudo' (and prefixing npm to my home directory), got the same.

I'll try (this evening, after work) to re-install Node/npm with 'sudo', and try with differents way...

Thing is, after lot of reading, that's atom's does not check $PATH as it should be done ...

I keep you informed :D

ps : since i'm going to work/build on my "onw-micro-javascript-framework", i'll not spend lot of time on this issue, since launching atom via terminal works fine.

pps : do you have installed Node/npm using sudo, or other way ? Could you give me your procedure of installation u've used ?

Cheer

2014-05-12 20:00 GMT+02:00 Alex LaFroscia notifications@github.com:

Hey, can I get more information about how you're launching the project? I know that you said you weren't launching it from the command line with the atom command and that you were using the Dock. I tried launching Atom that was, then opening the project manually by going to File > Open and selecting the folder for the project, but even under those circumstances the server command worked fine.

— Reply to this email directly or view it on GitHubhttps://github.com/alexlafroscia/atom-ember-cli-helper/issues/1#issuecomment-42865836 .


. ,-'""`-. (,-.._,'( |\-/| -.-' \ )-( , o o) - \_`"'-


(Miaow...Miaow)

alexlafroscia commented 10 years ago

I'm fairly sure I just used the installer for Node available here when you click "Install". I understand that you're trying to open Atom through the Dock, but how are you actually opening the project itself that contains the Ember-Cli project? Just clicking on the Atom icon alone would open up an empty file -- what do you do from there? I'm trying to recreate on my own machine but am unable to reproduce the error.

YomeKatsuma commented 10 years ago

Opening Atom from the Dock, then do "Open..." and choose my working folder (which, when using terminal - i.e. launching Atom via the in-folder-path, mmm, all goes right).

2014-05-13 16:25 GMT+02:00 Alex LaFroscia notifications@github.com:

I'm fairly sure I just used the installer for Node available herehttp://nodejs.org/when you click "Install". I understand that you're trying to open Atom through the Dock, but how are you actually opening the project itself that contains the Ember-Cli project? Just clicking on the Atom icon alone would open up an empty file -- what do you do from there? I'm trying to recreate on my own machine but am unable to reproduce the error.

— Reply to this email directly or view it on GitHubhttps://github.com/alexlafroscia/atom-ember-cli-helper/issues/1#issuecomment-42961493 .


. ,-'""`-. (,-.._,'( |\-/| -.-' \ )-( , o o) - \_`"'-


(Miaow...Miaow)

alexlafroscia commented 10 years ago

That's so strange... I did the same thing on my computer and had no issues running commands.

YomeKatsuma commented 10 years ago

How do you install "ember-CLI" (i've done the install with no 'sudo') ?

Concerning npm, (i used the same installer as yours -- the offical) : i've use the prefix command to avoid rights/permission errors since ember-CLI was not installed using 'sudo'...

Like i've told you, i'll try this evening (oh god, this is evening !!) a clean install.

alexlafroscia commented 10 years ago

No rush :) I just ran npm install -g ember-cli to install Ember-CLI, if I remember correctly

YomeKatsuma commented 10 years ago

Finally working... (yeeeepa !)

... but two main problems occur =

1) While installing ember-cli i've encountered the _EACCES, Permission denied '/usr/local/lib/nodemodules, which was solved by changing the permission (using the GUI, aka cmd-i) capture decran 2014-05-13 a 23 28 45

...oooch well, now I can install npm packages without using the 'sudo' (and globaly) using the

npm install -g supa-hypa-funky-module

Which is better, while, after testing, installing ember-cli with the 'sudo' (to by-pass the EACCESS), i've have to use it (sudo) even when doing 'ember new Foo', and, 'ember server' (which was really painfull, since this gave an other EACCESS during copying files and stuff onto the tmp folder...bla bla bla...headache ^_^).

So, now ember-cli works fine, server runs, time to test with Atom-Ember-Cli-Helper...

....tada...doesn't work :(

2) So, i've have to add the PATH on the Atom init script file (aka Init.coffee) :

process.env.PATH = ["/usr/local/bin", "/usr/local/lib", process.env.PATH].join(":")

capture decran 2014-05-13 a 23 34 11

And now everything works (perfectly).

I succeeded to launch Atom-Ember-Cli-Helper, but, sincerly, this is an issue, since this involve too many "tricks" to make it work.

ps : my user is the administrator of my Mac, so this is not the problem. pps : i've updated my .bash_profile to include all the node/npm PATH.

Hope it helps --- time to go sleeping

Cheer

YomeKatsuma commented 10 years ago

Oh...just for fun (not trolling) :

capture decran 2014-05-13 a 23 41 22

alexlafroscia commented 10 years ago

In your opinion, do you think that there is something I can do to the plugin to make this easier? To me, it sounds like a configuration/Atom issue, not something wrong with the this plugin. However, if there's something that you would recommend I do different, I'd be happy to try changing something and/or would gladly accept a pull-request.

YomeKatsuma commented 10 years ago

Hi,

I think you could add a "trouble/issue" on the description page which relate this point.

Cheer,

2014-05-14 2:14 GMT+02:00 Alex LaFroscia notifications@github.com:

In your opinion, do you think that there is something I can do to the plugin to make this easier? To me, it sounds like a configuration/Atom issue, not something wrong with the this plugin. However, if there's something that you would recommend I do different, I'd be happy to try changing something and/or would gladly accept a pull-request.

— Reply to this email directly or view it on GitHubhttps://github.com/alexlafroscia/atom-ember-cli-helper/issues/1#issuecomment-43028922 .


. ,-'""`-. (,-.._,'( |\-/| -.-' \ )-( , o o) - \_`"'-


(Miaow...Miaow)

alexlafroscia commented 10 years ago

Sure, I can add that and say that if you're experiencing trouble, try opening it through the atom command in the command line.

YomeKatsuma commented 10 years ago

Hello,

All goes right with the command line ;-)

2014-05-14 17:25 GMT+02:00 Alex LaFroscia notifications@github.com:

Sure, I can add that and say that if you're experiencing trouble, try opening it through the atom command in the command line.

— Reply to this email directly or view it on GitHubhttps://github.com/alexlafroscia/atom-ember-cli-helper/issues/1#issuecomment-43095225 .


. ,-'""`-. (,-.._,'( |\-/| -.-' \ )-( , o o) - \_`"'-


(Miaow...Miaow)

bj-mcduck commented 9 years ago

I also had to go through the same steps to accomplish this as @YomeKatsuma. Command line didn't work, but adding the proccess.env.PATH line did.

Maybe there's a way to alter atom's path from a module?