intellij-emberjs icon indicating copy to clipboard operation
intellij-emberjs copied to clipboard

Allow the user to specify where the Ember root directory is

Open discopatrick opened this issue 6 years ago • 7 comments

We are having a problem using this plugin, because our Ember project (and thus our node_modules directory) is not in the project root. This is because our project consists of various sub-projects, including a Django REST backend (in a backend dir), as well as the Ember project (in a frontend dir).

When we try to run the Ember Serve run configuration, we get the error Error running 'MyProject': Cannot run program "/home/me/dev/myproject/node_modules/.bin/ember" (in directory "/home/me/dev/myproject"): error=2, No such file or directory

The correct path to ember should be: /home/me/dev/myproject/frontend/node_modules/.bin/ember.

Can we add a setting to specify the Ember root dir?

discopatrick avatar Mar 05 '18 16:03 discopatrick

I've got a similar project setup as you:

 - submodule1
 - submodule2
 - ember module

and this plugin runs without a problem. I am not sure how to help you though :(

IgorKvasn avatar Mar 18 '18 10:03 IgorKvasn

@discopatrick <frontend> is a different module in your project right? Does this only affect the ember serve run configuration?

makepanic avatar Apr 03 '18 14:04 makepanic

Yes, it's just another folder in the project. And yes, it only seems to affect the Ember side of things. For my Django backend, I can specify the working directory of the run configuration to be backend.

Hmm, is it possible to choose the working directory for the Ember plugin? Maybe I missed this...

Edited to add: Perhaps I have misunderstood your question - these are not different JS modules - these are just different parts of a larger project, with different components written in Python and JS, and a Docker folder, for example.

discopatrick avatar Apr 04 '18 07:04 discopatrick

I was asking because we have an issue for adding support of run configuration per module: https://github.com/Turbo87/intellij-emberjs/issues/181 This wouldn't fix your issue though. So maybe it would be better to be able to set the working directory instead of a module.

makepanic avatar Apr 05 '18 16:04 makepanic

I'm seeing a similar problem w/ resolution of import statements throughout my project. I have a similar structure to @discopatrick :

/dev
  /my-project
    /app
    /config
    etc etc
  /api
  /something-else

CMD-clicking on anything like import bar from 'my-project/foo/bar' results in the message "Cannot find a declaration to go to"

Any help w/ this would be GREAT!

RavenHursT avatar Jun 18 '18 20:06 RavenHursT

Is this issue going to be fixed?

JonnoFTW avatar Apr 09 '20 04:04 JonnoFTW

PRs welcome 😉

Turbo87 avatar Apr 09 '20 06:04 Turbo87