intellij-emberjs
intellij-emberjs copied to clipboard
Allow the user to specify where the Ember root directory is
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?
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 :(
@discopatrick <frontend>
is a different module in your project right?
Does this only affect the ember serve run configuration?
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.
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.
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!
Is this issue going to be fixed?
PRs welcome 😉