{"id":2518,"date":"2022-07-08T22:31:00","date_gmt":"2022-07-08T13:31:00","guid":{"rendered":"https:\/\/mattarishitemota.com\/?p=2518"},"modified":"2022-07-09T16:56:44","modified_gmt":"2022-07-09T07:56:44","slug":"expo%e3%81%a7firebase%e3%82%92%e4%bd%bf%e3%81%84%e3%81%9f%e3%81%84","status":"publish","type":"post","link":"https:\/\/mattarishitemota.com\/?p=2518","title":{"rendered":"Expo\u3067firebase\u3092\u4f7f\u3044\u305f\u3044"},"content":{"rendered":"\n<p>\u4e0b\u8a18\u306e\u516c\u5f0f\u30ac\u30a4\u30c9\u306b\u6cbf\u3063\u3066\u5c0e\u5165\u3057\u305f\u3068\u3053\u308d\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/firebase.google.com\/docs\/web\/setup?hl=ja\">https:\/\/firebase.google.com\/docs\/web\/setup?hl=ja<\/a><\/p>\n\n\n\n<pre class=\"wp-block-verse\">While trying to resolve module `idb` from file `\/Users\/pj\/node_modules\/@firebase\/app\/dist\/esm\/index.esm2017.js`, the package `\/Users\/pj\/node_modules\/idb\/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`\/Users\/pj\/node_modules\/idb\/build\/index.cjs`. Indeed, none of these files exist:\n\n  * \/Users\/pj\/node_modules\/idb\/build\/index.cjs(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)\n  * \/Users\/pj\/node_modules\/idb\/build\/index.cjs\/index(.native|.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)\nFailed building JavaScript bundle.<\/pre>\n\n\n\n<p>\u8abf\u3079\u3066\u307f\u308b\u3068\u3001EXPO \u306e\u516c\u5f0f\u30ac\u30a4\u30c9\u306b Firebase \u306e\u4f7f\u3044\u65b9\u304c\u8f09\u3063\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.expo.dev\/guides\/using-firebase\/\">https:\/\/docs.expo.dev\/guides\/using-firebase\/<\/a><\/p>\n\n\n\n<p><code>expo install firebase<\/code> \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u308d\u3001\u3068\u66f8\u3044\u3066\u3044\u305f\u306e\u3067\u4e00\u65e6 <code>yarn remove firebase<\/code> \u3057\u3066 <code>expo<\/code> \u30b3\u30de\u30f3\u30c9\u3067\u5165\u308c\u308b\u3002<code>expo<\/code> \u30b3\u30de\u30f3\u30c9\u3067\u3044\u308c\u308b\u3068\u3001Expo \u306e SDK \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u3066\u5fc5\u8981\u306a\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5165\u308c\u3066\u304f\u308c\u308b\u307f\u305f\u3044\u3002<\/p>\n\n\n\n<p>\u305f\u3060\u3001package.json \u3092\u898b\u308b\u9650\u308a\u3067\u306f firebase \u3057\u304b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u671f\u5f85\u3067\u304d\u306a\u3044\u304c\u3002<\/p>\n\n\n\n<p>\u30d3\u30eb\u30c9\u3059\u308b\u3068\u3084\u3063\u3071\u308a\u540c\u3058\u30a8\u30e9\u30fc&#8230;<\/p>\n\n\n\n<p>\u4e0b\u8a18\u3092\u898b\u308b\u3068 <code>metro.config.js<\/code> \u3068\u3044\u3046\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3057\u3001\u62e1\u5f35\u5b50\u306b cjs \u3092\u8ffd\u52a0\u3059\u308b\u3068\u3044\u3051\u308b\u304b\u3082\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/60124435\/however-this-package-itself-specifies-a-main-module-field-that-could-not-be-r?answertab=trending#tab-top\">https:\/\/stackoverflow.com\/questions\/60124435\/however-this-package-itself-specifies-a-main-module-field-that-could-not-be-r?answertab=trending#tab-top<\/a><\/p>\n\n\n\n<p>Expo \u3067\u3082\u4f7f\u3048\u308b\u8a71\u306a\u306e\u304b\u3088\u304f\u308f\u304b\u3089\u306a\u304b\u3063\u305f\u304c\u3001Expo \u306e\u516c\u5f0f\u30ac\u30a4\u30c9\u306b\u3082\u8f09\u3063\u3066\u3044\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.expo.dev\/guides\/customizing-metro\/\">https:\/\/docs.expo.dev\/guides\/customizing-metro\/<\/a><\/p>\n\n\n\n<p>\u305f\u3060\u3001SDK \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c 41 \u4ee5\u524d\u306f @expo\/metro-config \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u306a\u306e\u3067\u3001<code>expo install @expo\/metro-config<\/code> \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u4e0a\u3067\u3001\u30eb\u30fc\u30c8\u30d5\u30a9\u30eb\u30c0\u306b <code>metro.config.js<\/code> \u3092\u4f5c\u6210\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-file=\"metro.config.js\" data-lang=\"JavaScript\"><code>const { getDefaultConfig } = require(&#39;@expo\/metro-config&#39;);\n\nconst defaultConfig = getDefaultConfig(__dirname);\n\ndefaultConfig.resolver.sourceExts.push(&#39;cjs&#39;);\n\nmodule.exports = defaultConfig;<\/code><\/pre><\/div>\n\n\n\n<p>\u3046\u30fc\u3093\u3001\u540c\u3058\u30a8\u30e9\u30fc\u3002\u4e0a\u8a18\u304c\u4e0a\u624b\u304f\u8aad\u307f\u8fbc\u307e\u308c\u3066\u306a\u3044\u306e\u3060\u308d\u3046\u304b\uff1f\u3082\u3046\u5c11\u3057\u8abf\u3079\u308b\u3068\u3001\u4e0b\u8a18\u3092\u898b\u3064\u3051\u305f\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/72158122\/expo-firebase-authentication-while-trying-to-resolve-module-idb-from-file?answertab=trending#tab-top\">https:\/\/stackoverflow.com\/questions\/72158122\/expo-firebase-authentication-while-trying-to-resolve-module-idb-from-file?answertab=trending#tab-top<\/a><\/p>\n\n\n\n<p>sourceExts \u3067\u306f\u306a\u304f assetExts \u306b\u8ffd\u52a0\u3057\u306a\u3044\u3068\u30c0\u30e1\u306a\u306e\u304b\u3082\u3002<\/p>\n\n\n\n<p><code>defaultConfig.resolver.assetExts.push('cjs');<\/code> \u306b\u5909\u3048\u305f\u3089\u3044\u3051\u305f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8a18\u306e\u516c\u5f0f\u30ac\u30a4\u30c9\u306b\u6cbf\u3063\u3066\u5c0e\u5165\u3057\u305f\u3068\u3053\u308d\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u3002 https:\/\/firebase.google.com\/docs\/web\/setup?hl=ja While trying to resolve modul <span class=\"more-text\">&hellip;<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[21],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2533,"url":"https:\/\/mattarishitemota.com\/?p=2533","url_meta":{"origin":2518,"position":0},"title":"\u4eca\u3055\u3089 Expo SDK36 \u3067 jest \u3092\u4f7f\u3063\u3066\u30e6\u30cb\u30c3\u30c8\u30c6\u30b9\u30c8\u3057\u305f\u3044","author":"Owner","date":"2022\u5e747\u670811\u65e5","format":false,"excerpt":"Expo \u306e\u30a2\u30d7\u30ea\u3067\u3001\u30ed\u30b8\u30c3\u30af\u304c\u8907\u96d1\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u95a2\u6570\u3092\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3057\u305f\u3044\u3002\u3057\u304b\u3082\u30bd\u30fc\u30b9\u306f\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2365,"url":"https:\/\/mattarishitemota.com\/?p=2365","url_meta":{"origin":2518,"position":1},"title":"Electron Forge \u306e Webpack \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3067 Electron Preferences \u3092\u4f7f\u3046\u3068\u3001\u8a2d\u5b9a\u753b\u9762\u304c\u771f\u3063\u767d\u306b\u306a\u308b","author":"Owner","date":"2022\u5e742\u670811\u65e5","format":false,"excerpt":"\u72b6\u6cc1\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001debug: true \u306b\u3057\u3066 DevTools \u3092\u8868\u793a\u3057\u3066\u307f\u308b\u3002 const \u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":480,"url":"https:\/\/mattarishitemota.com\/?p=480","url_meta":{"origin":2518,"position":2},"title":"Expo\u30a2\u30d7\u30ea\u3067localStorage\u3092\u4f7f\u3044\u305f\u3044","author":"Owner","date":"2020\u5e743\u670812\u65e5","format":false,"excerpt":"Expo\u3067\u958b\u767a\u4e2d\u306b\u624b\u8efd\u306b\u8a2d\u8a08\u5024\u3092\u6c38\u7d9a\u5316\u3057\u305f\u304f\u306a\u3063\u305f\u3002JavaScript\u3060\u3068localStorage\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1080,"url":"https:\/\/mattarishitemota.com\/?p=1080","url_meta":{"origin":2518,"position":3},"title":"Expo\u3067\u4f5c\u3063\u305f\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u306b\u306f","author":"Owner","date":"2020\u5e749\u67087\u65e5","format":false,"excerpt":"\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308b\u306e\u306bExpo\u304c\u4fbf\u5229\u3002\u516c\u5f0f\u624b\u9806\u306b\u6cbf\u3063\u3066\u5b9f\u65bd\u3059\u308c\u3070\u3001iPhone\u5b9f\u6a5f\u3067\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":440,"url":"https:\/\/mattarishitemota.com\/?p=440","url_meta":{"origin":2518,"position":4},"title":"Expo\u3067\u306e\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u958b\u767a\u304c\u5feb\u9069","author":"Owner","date":"2020\u5e742\u670828\u65e5","format":false,"excerpt":"JavaScript\u3067\u30cd\u30a4\u30c6\u30a3\u30d6\u306e\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3067\u304d\u308bReact Native\u3092\u30e9\u30c3\u30d1\u30fc\u3057\u305f\u3001E\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":533,"url":"https:\/\/mattarishitemota.com\/?p=533","url_meta":{"origin":2518,"position":5},"title":"Angular\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\uff084.0.1\u21925.x\uff09","author":"Owner","date":"2020\u5e743\u670822\u65e5","format":false,"excerpt":"Angular Update Guide \u306b\u5f93\u3044\u5bfe\u5fdc\u3057\u3066\u307f\u308b\u3002 https:\/\/update.ang\u2026","rel":"","context":"IT","block_context":{"text":"IT","link":"https:\/\/mattarishitemota.com\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2518"}],"collection":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2518"}],"version-history":[{"count":10,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2518\/revisions"}],"predecessor-version":[{"id":2532,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=\/wp\/v2\/posts\/2518\/revisions\/2532"}],"wp:attachment":[{"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattarishitemota.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}