question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to resolve module after update viro to 2.13.0

See original GitHub issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac, Windows, Linux
  2. Device OS & Version: iOS 12.1
  3. Version: ViroReact version:2.13 React Native 0.57.1
  4. Device(s): iPhone X, iPhone 6s

Description

I am using Viro3DObject component with some obj file since viro 2.12 , there is an error messages after I update to 2.13: “unable to resolve module ‘./res/circle.obj’”, and I have checked the path is correct and the rn-cli.config are also included the obj file type.

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, screen capture, video recording. The more information you provide, the better we can support you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
pnguyen1901commented, Aug 3, 2020

Change the content of your metro.config.js to this. It should work. Worked for me!

const { getDefaultConfig } = require("metro-config");
module.exports = (async () => {
  const {
    resolver: { assetExts }
  } = await getDefaultConfig();

  return {
    resolver: {
      assetExts: [...assetExts, "obj", "mtl", "JPG", "vrx", "hdr", "gltf", "glb", "bin", "arobject", "gif"]
    },
    transformer: {
      getTransformOptions: async () => ({
        transform: {
          experimentalImportSupport: false,
          inlineRequires: false,
        },
      }),
    },
  };
})();
0reactions
GretaSimonyancommented, Dec 1, 2021

Never mind i already fix the issue I use

  • “react”: “17.0.2”,
  • “react-native”: “0.66.3”, and i just needed add rn-cli.config.js file which showing here
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve module in react-viro - Stack Overflow
You need to add assets support manualy if you have imported ViroAR in existing React-Native app (not created with Viro CLI).
Read more >
Troubleshooting | React Navigation
I'm getting an error "Unable to resolve module" after updating to the latest version​. This might happen for 3 reasons: Stale cache of...
Read more >
Module not found: Can't resolve 'moment' error | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'moment'", make sure to install the moment package by opening your terminal in...
Read more >
unable to resolve module react native - You.com | The search ...
New Update. this issue is fixed on version "^7.1.0" and there is no need to install the @react-native-community/toolbar-android . Open side panel.
Read more >
[Solved]-Unable to resolve module in react-viro-React Native
Metro configuration for React Native * https://github.com/facebook/react-native * * @format */ module.exports = { resolver: { assetExts: [ 'obj', 'mtl', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found