# file1.js
import {util} from 'project/utils/file2'
The “app” path part is missing.
But the import above is not properly resolved by WebStorm IDE, as it expects following:
# file1.js
import {util} from 'project/app/utils/file2'
Without correct resolving of imports I am loosing much of IDE productivity features (code completion / inspection / refactoring). I do not want to use relative imports (./…/) because the project is huge and it would make imports less transparent.
Can someone more experienced in ember-cli internals help me with solution.
Thank you for quick reply. But I am afraid the solution mentioned on stackoverflow does not work here. Because it is not about resource root but incorrect path inside the resource root:
Consider following resource roots:
resource root is project, the import path on filesystem is: app/utils/file2 which is not supported by ember-cli
resource root is project/app, the import path on filesystem is utils/files2 which is also not supported by ember-cli
only supported path by ember cli is project/utils/file2
Why does not ember-cli use the real paths for imports or is it possible to enable it somewhere? Thanks in advance.
Changing roots will not help regarding my previous posts - because path used for ember-cli import is not filesystem path (relative nor absolute).
Relative filesystem path is: import {util} from 'project/app/utils/file2
but ember expect import path:
```import {util} from ‘project/utils/file2’````
See the “app” segment is missing, but the “project” segment is there - this makes impossible for IDE to resolve imported file - no root settings will help, because the path is modified under the root.
I am considering this as a flaw of Ember CLI and I am ready to somehow contribute to fix the issue. But I would like to consult it here, before I will start the Github issue or submit WebStorm support ticket.