{"id":4045,"date":"2016-05-06T12:18:17","date_gmt":"2016-05-06T12:18:17","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=4045"},"modified":"2016-05-06T12:18:17","modified_gmt":"2016-05-06T12:18:17","slug":"fixing-webpack-error-error-entry-module-not-found-error-cannot-resolve-file-directory-srcssl_searchentry-js-dprojectsimage-annotation","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-webpack-error-error-entry-module-not-found-error-cannot-resolve-file-directory-srcssl_searchentry-js-dprojectsimage-annotation\/","title":{"rendered":"Fixing webpack error: ERROR in Entry module not found: Error: Cannot resolve &#8216;file&#8217; or &#8216;directory&#8217; .\/src\/ssl_search\/Entry.js in D:\\projects\\image-annotation"},"content":{"rendered":"<p>If you try to set up the &#8220;resolve&#8221; part of webpack, you can start getting errors finding files that clearly exist:<\/p>\n<pre>\nERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' .\/src\/ssl_search\/Entry.js in D:\\projects\\image-annotation\n<\/pre>\n<p>This will happen if you set up resolve like so:<\/p>\n<pre lang=\"javascript\">\n  resolve: {\n    extensions: [\".tsx\", \".ts\", \".jsx\", \".js\"]\n  },\n<\/pre>\n<p>What is happening is that the resolver is creating a virtual filesystem, and filtering the contents of a directory with these. Since folders don&#8217;t normally have extensions, they are removed. To fix this, you need the following:<\/p>\n<pre lang=\"javascript\">\n  resolve: {\n    extensions: [\"\", \".tsx\", \".ts\", \".jsx\", \".js\"]\n  },\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Fixing a webpack error with resolvers<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[302,592],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4045"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=4045"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4045\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=4045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=4045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=4045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}