{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2776","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2776/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2776/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2776/events","html_url":"https://github.com/ember-cli/ember-cli/issues/2776","id":52308543,"number":2776,"title":"File not found error when referencing config/environment from addon dummy applications.","user":{"login":"SimonKaluza","id":648386,"avatar_url":"https://avatars.githubusercontent.com/u/648386?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonKaluza","html_url":"https://github.com/SimonKaluza","followers_url":"https://api.github.com/users/SimonKaluza/followers","following_url":"https://api.github.com/users/SimonKaluza/following{/other_user}","gists_url":"https://api.github.com/users/SimonKaluza/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonKaluza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonKaluza/subscriptions","organizations_url":"https://api.github.com/users/SimonKaluza/orgs","repos_url":"https://api.github.com/users/SimonKaluza/repos","events_url":"https://api.github.com/users/SimonKaluza/events{/privacy}","received_events_url":"https://api.github.com/users/SimonKaluza/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ember-cli/ember-cli/labels/unverified","name":"unverified","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-12-17T23:53:30Z","updated_at":"2015-01-24T22:13:50Z","closed_at":null,"body":"It seems the config file directory tree is not getting added to Ember CLI Addon projects when running `ember serve` to deploy the \"dummy\" application.\r\n\r\nThough the EmberAddon object seems to correctly resolve the full path `dummy/config/environment.js` and pass this and the environment information to the Broccoli build correctly, any file in the dummy application that has an `import ENV from 'config/environment'` statement eventually throws \"a file not found\" error during the broccoli-es6-concatenation step as follow:\r\n\r\n```\r\nFile: dummy/adapters/application.js\r\nENOENT, no such file or directory '/myproject/tmp/tree_merger-tmp_dest_dir-KG1tamoR.tmp/dummy/config/environment.js'\r\nError: ENOENT, no such file or directory '/myproject/tmp/tree_merger-tmp_dest_dir-KG1tamoR.tmp/dummy/config/environment.js'\r\n    at Error (native)\r\n    at Object.fs.statSync (fs.js:721:18)\r\n    at addModule (/myproject/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:94:46)\r\n    at addModule (/myproject/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:143:9)\r\n    at /myproject/node_modules/ember-cli/node_modules/broccoli-es6-concatenator/index.js:59:7\r\n    at $$$internal$$tryCatch (/myproject/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)\r\n    at $$$internal$$invokeCallback (/myproject/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)\r\n    at $$$internal$$publish (/myproject/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:453:11)\r\n    at $$rsvp$asap$$flush (/myproject/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)\r\n    at process._tickCallback (node.js:372:11)\r\nevents.js:85\r\n      throw er; // Unhandled 'error' event\r\n            ^\r\nError: unable to resolve root /myproject/tests/dummy/app: directory /myproject/tests/dummy/app is not watched\r\n    at null.<anonymous> (/myproject/node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/fb-watchman/index.js:84:23)\r\n    at emit (events.js:107:17)\r\n    at readableAddChunk (_stream_readable.js:162:16)\r\n    at Readable.push (_stream_readable.js:125:10)\r\n    at Transform.push (_stream_transform.js:140:32)\r\n    at JSONStream._transform (/myproject/node_modules/ember-cli/node_modules/broccoli-sane-watcher/node_modules/sane/node_modules/fb-watchman/node_modules/json-stream/lib/json-stream.js:30:14)\r\n    at Transform._read (_stream_transform.js:179:10)\r\n    at Transform._write (_stream_transform.js:167:12)\r\n    at doWrite (_stream_writable.js:265:12)\r\n    at writeOrBuffer (_stream_writable.js:252:5)\r\n```\r\n\r\nThough I experimented with various filepathing tricks and modifying the EmberAddon's `configPath` property, no amount of tweaking could get this error to go away.  I did notice that [at one point during the EmberApp index tree generation the config file seems to get moved to a tree where it exists as config/environment/{development.json}](https://github.com/stefanpenner/ember-cli/blob/master/lib/broccoli/ember-app.js#L318) before it gets fed to Broccoli, which I think might be confusing the concatenator, though this doesn't explain why importing config/environment seems to work fine in my regular application.\r\n\r\nIf someone could point me in the right direction for where the es6 concatenator's configPath trees diverge from the rest of the build I'd be happy to work on a pull request that fixes this.  "},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/71340126","html_url":"https://github.com/ember-cli/ember-cli/issues/2776#issuecomment-71340126","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/2776","id":71340126,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T22:13:50Z","updated_at":"2015-01-24T22:13:50Z","body":"> version: 0.1.6\r\n\r\nthis should be fixed on the latest version (atleast the manifestation looks related to a recent fix)"}}