title: Error: undefined Unable to resolve module
body: <p>I am trying to load glb file as:</p>
  <pre><code>const asset = Asset.fromModule(require('../assets/webgl/RModelNoKeys.glb'));
  </code></pre>
  <pre><code>#metro.config.js
  
  module.exports = {
      resolver: {
          assetExts: ['db', 'mp3', 'ttf', 'obj', 'png', 'jpg', 'gltf', 'glb'],
      },
      transformer: {
          assetPlugins: ['expo-asset/tools/hashAssetFiles'],
      },
  };
  </code></pre>
  <p>although the file <code>RModelNoKeys.glb</code> does exist at the relative location at expo project:</p>
  <p><a href="https://i.stack.imgur.com/1Umn8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Umn8.png" alt="enter image description here" /></a></p>
  <p>, but I am getting this error:</p>
  <pre><code>None of these files exist:
  * App/assets/webgl/RModelNoKeys.glb(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
    * App/assets/webgl/RModelNoKeys.glb/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
    55 | async function main() {
    56 |   try {
  &gt; 57 |     const asset = Asset.fromModule(require('../assets/webgl/RModelNoKeys.glb'));
       |                                             ^
    58 |     await asset.downloadAsync();
    59 |
    60 |     const b64 = await FileSystem.readAsStringAsync(asset.localUri, {
      at ModuleResolver.resolveDependency (/Users/sam/sam-expo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:211:15)
      at DependencyGraph.resolveDependency (/Users/sam/sam-expo/node_modules/metro/src/node-haste/DependencyGraph.js:413:43)
      at Object.resolve (/Users/sam/sam-expo/node_modules/metro/src/lib/transformHelpers.js:317:42)
      at resolve (/Users/sam/sam-expo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:629:33)
      at /Users/sam/sam-expo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:645:26
      at Array.reduce (&lt;anonymous&gt;)
      at resolveDependencies (/Users/sam/sam-expo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:644:33)
      at /Users/sam/sam-expo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:329:33
      at Generator.next (&lt;anonymous&gt;)
      at asyncGeneratorStep (/Users/sam/sam-expo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)
   ERROR  [Error: undefined Unable to resolve module ../assets/webgl/RModelNoKeys.glb from /Users/sam/sam-expo/App/containers/ReadScreen.js:
  
  None of these files exist:
    * App/assets/webgl/RModelNoKeys.glb(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
    * App/assets/webgl/RModelNoKeys.glb/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
    55 | async function main() {
    56 |   try {
  &gt; 57 |     const asset = Asset.fromModule(require('../assets/webgl/RModelNoKeys.glb'));
       |
  </code></pre>
  <pre><code>#package.json
  {
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;android&quot;: &quot;react-native run-android&quot;,
      &quot;ios&quot;: &quot;react-native run-ios&quot;,
      &quot;web&quot;: &quot;expo start --web&quot;,
      &quot;start&quot;: &quot;react-native start&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@react-native-community/async-storage&quot;: &quot;^1.7.1&quot;,
      &quot;@react-native-community/cli-platform-android&quot;: &quot;4.13.0&quot;,
      &quot;@react-native-community/slider&quot;: &quot;^3.0.3&quot;,
      &quot;@react-native-community/viewpager&quot;: &quot;^3.3.0&quot;,
      &quot;expo&quot;: &quot;~41.0.1&quot;,
      &quot;expo-asset&quot;: &quot;~8.3.1&quot;,
      &quot;expo-gl&quot;: &quot;~10.2.0&quot;,
      &quot;expo-splash-screen&quot;: &quot;~0.10.2&quot;,
      &quot;expo-status-bar&quot;: &quot;~1.0.4&quot;,
      &quot;expo-three&quot;: &quot;^5.7.0&quot;,
      &quot;expo-updates&quot;: &quot;~0.5.5&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;native-base&quot;: &quot;^2.15.2&quot;,
      &quot;react&quot;: &quot;17.0.2&quot;,
      &quot;react-dom&quot;: &quot;17.0.2&quot;,
      &quot;react-native&quot;: &quot;~0.64.1&quot;,
      &quot;react-native-bootsplash&quot;: &quot;^3.2.3&quot;,
      &quot;react-native-custom-keyboard-kit&quot;: &quot;^1.0.2&quot;,
      &quot;react-native-gesture-handler&quot;: &quot;~1.10.3&quot;,
      &quot;react-native-modal&quot;: &quot;^11.10.0&quot;,
      &quot;react-native-reanimated&quot;: &quot;~2.2.0&quot;,
      &quot;react-native-restart&quot;: &quot;^0.0.22&quot;,
      &quot;react-native-safe-area-context&quot;: &quot;^3.2.0&quot;,
      &quot;react-native-screens&quot;: &quot;~3.3.0&quot;,
      &quot;react-native-splash-screen&quot;: &quot;^3.2.0&quot;,
      &quot;react-native-sqlite-storage&quot;: &quot;^5.0.0&quot;,
      &quot;react-native-unimodules&quot;: &quot;~0.13.3&quot;,
      &quot;react-native-web&quot;: &quot;~0.16.3&quot;,
      &quot;react-native-webview&quot;: &quot;^11.6.2&quot;,
      &quot;react-navigation&quot;: &quot;^4.4.4&quot;,
      &quot;react-navigation-stack&quot;: &quot;^2.10.4&quot;,
      &quot;react-navigation-tabs&quot;: &quot;^2.11.1&quot;,
      &quot;three&quot;: &quot;^0.129.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.14.3&quot;,
      &quot;@babel/runtime&quot;: &quot;^7.14.0&quot;,
      &quot;@react-native-community/eslint-config&quot;: &quot;^2.0.0&quot;,
      &quot;babel-jest&quot;: &quot;^27.0.1&quot;,
      &quot;eslint&quot;: &quot;^7.27.0&quot;,
      &quot;jest&quot;: &quot;^27.0.1&quot;,
      &quot;metro-react-native-babel-preset&quot;: &quot;^0.66.0&quot;,
      &quot;react-test-renderer&quot;: &quot;17.0.2&quot;
    },
    &quot;private&quot;: true
  }
  
  </code></pre>
  <p>any idea?</p>