{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/18","repository_url":"https://api.github.com/repos/elastic/kibana-plugin-helpers","labels_url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/18/comments","events_url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/18/events","html_url":"https://github.com/elastic/kibana-plugin-helpers/issues/18","id":190172042,"number":18,"title":"Plugin install can't resolve module ","user":{"login":"Kikketer","id":958042,"avatar_url":"https://avatars.githubusercontent.com/u/958042?v=3","gravatar_id":"","url":"https://api.github.com/users/Kikketer","html_url":"https://github.com/Kikketer","followers_url":"https://api.github.com/users/Kikketer/followers","following_url":"https://api.github.com/users/Kikketer/following{/other_user}","gists_url":"https://api.github.com/users/Kikketer/gists{/gist_id}","starred_url":"https://api.github.com/users/Kikketer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kikketer/subscriptions","organizations_url":"https://api.github.com/users/Kikketer/orgs","repos_url":"https://api.github.com/users/Kikketer/repos","events_url":"https://api.github.com/users/Kikketer/events{/privacy}","received_events_url":"https://api.github.com/users/Kikketer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-17T21:39:57Z","updated_at":"2016-11-18T18:43:59Z","closed_at":null,"body":"So I have a symlink (or just a full copy) of a plugin that I'm working on inside the `/plugins` folder.  For this example let's say it's https://github.com/Kikketer/generic-feedback-plugin.\r\n\r\nSimply clone that plugin and place it along side `/kibana` (same parent).  Then create a symlink in the `/kibana/plugins` directory called \"generic-feedback-plugin\" that points to the \"generic-feedback-plugin\" folder (the one you just cloned).\r\n\r\nAll is well, right up until you decide to install another plugin:\r\n```\r\n./bin/kibana-plugin install x-pack\r\n```\r\n\r\nAfter a bit I get this error:\r\n```\r\n    ERROR in ./optimize/bundles/status_page.entry.js\r\n    Module not found: Error: Cannot resolve 'file' or 'directory' /Users/***/Documents/htdocs/kibana/plugins/generic-feedback-plugin/public/public/feedback in /Users/***/Documents/htdocs/kibana/optimize/bundles\r\n     @ ./optimize/bundles/status_page.entry.js 35:0-58\r\n```\r\n(the *** mask my ID, still figuring out the compliance stuff)\r\n\r\nNote the `/public/public` part in the folder.  That seemed odd to me, so I removed `/public` from the hack in the index.js.  But it then just said the same error with no `/public` folder in it at all.  Smells like it's doing something odd there."},"comment":{"url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/comments/261608794","html_url":"https://github.com/elastic/kibana-plugin-helpers/issues/18#issuecomment-261608794","issue_url":"https://api.github.com/repos/elastic/kibana-plugin-helpers/issues/18","id":261608794,"user":{"login":"Kikketer","id":958042,"avatar_url":"https://avatars.githubusercontent.com/u/958042?v=3","gravatar_id":"","url":"https://api.github.com/users/Kikketer","html_url":"https://github.com/Kikketer","followers_url":"https://api.github.com/users/Kikketer/followers","following_url":"https://api.github.com/users/Kikketer/following{/other_user}","gists_url":"https://api.github.com/users/Kikketer/gists{/gist_id}","starred_url":"https://api.github.com/users/Kikketer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kikketer/subscriptions","organizations_url":"https://api.github.com/users/Kikketer/orgs","repos_url":"https://api.github.com/users/Kikketer/repos","events_url":"https://api.github.com/users/Kikketer/events{/privacy}","received_events_url":"https://api.github.com/users/Kikketer/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T18:43:59Z","updated_at":"2016-11-18T18:43:59Z","body":"The trick is the `feedback.js` file is in the `/public` folder.  What you are saying is that I should move that to the root?\r\n\r\nHere are my tests:\r\n__Test-1__: Have `plugins/generic-feedback-plugin/public/feedback` set in `index.js` and have that file actually exist.\r\nDo a build of this generic plugin, and install it via `./bin/kibana-plugin install file:///...`\r\n\r\nIt throws the error I originally reported above:\r\n\r\n```\r\n ERROR in ./optimize/bundles/status_page.entry.js\r\n    Module not found: Error: Cannot resolve 'file' or 'directory' /Users/***/Documents/htdocs/kibana/plugins/generic-feedback-plugin/public/public/feedback in /Users/***/Documents/htdocs/kibana/optimize/bundles\r\n     @ ./optimize/bundles/status_page.entry.js 35:0-58\r\n```\r\n\r\n__Test-2__: Remove `/public` to have the string: `plugins/generic-feedback-plugin/feedback` but not have a `feedback.js` file in the root of the plugin.\r\nDo a build of this generic plugin, and install it via `./bin/kibana-plugin install file:///...`\r\n\r\nThis actually worked!  But isn't 100% of the original problem because I did a build, I would rather symlink to all the plugins so I can actively develop them and have just kibana running (which then rebuilds and optimizes if any of the plugins change).\r\n\r\n__Test-3__: Add a simple `feedback.js` file to the root of the plugin that has nothing else but:\r\n\r\n```\r\nimport './public/feedback';\r\n```\r\n\r\nThis worked as well, however since not having the extra `feedback.js` file there also worked, I'm pretty sure it's doing nothing.\r\n\r\n__Test-4__: Do this all the symlink style.  Have the generic plugin symlinked into the `/plugins` directory and attempt to install x-pack.\r\n`plugins/generic-feedback-plugin/feedback`\r\nJust have it symlinked and attempt to install x-pack `./bin/kibana-plugin install x-pack`\r\n\r\nThis also worked.  So as I was writing this I expected to get an error here (as it's exactly the same as the original issue).  Not sure what's going on here but it seems things are happy enough for now.\r\n\r\nI've pushed a workaround branch to the generic-feedback-plugin.  https://github.com/Kikketer/generic-feedback-plugin/tree/workaround"}}
{"actor":{"display_login":"Kikketer"}}