Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Error: Unable to resolve module ../fabric/NativeSvgRenderableModule #2213

Open
LayMui opened this issue Jan 29, 2024 · 1 comment
Open
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario

Comments

@LayMui
Copy link

LayMui commented Jan 29, 2024

NB Never post screenshots of code. Post copy paste-able code if you include any.
Ignoring this will likely lead to direct closing of the issue.
Please respect the time and energy of open source maintainers.

Bug

Please provide a clear and concise description of what the bug is.
Include screenshots if needed.
Please test using the latest release of the library, as maybe said bug has been already fixed.

Unexpected behavior

If you have unexpected behavior, please create a clean project with the latest versions of react-native and react-native-svg

react-native init CleanProject
cd CleanProject/
yarn add react-native-svg
cd ios && pod install && cd ..
modify App.js -> run the app

If it's still an issue with the latest versions,
please make an sscce in the clean project,
and make it available as a git repo on github.
Or as a https://snack.expo.io/ if expo has the latest version,
and / or the bug exists both in the latest version and the one used in expo and snack.

Environment info

Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project

React native info output:

 react-native info
info Fetching system and libraries information...
(node:98243) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
  OS: macOS 14.3
  CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Memory: 153.65 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.1
    path: ~/.nvm/versions/node/v18.17.1/bin/node
  Yarn:
    version: 1.22.21
    path: /usr/local/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.1/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.2
    wanted: 0.73.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Library version:
"react-native-svg": "^13.14.0"
"react": "18.2.0",
"react-native": "0.73.2",

Steps To Reproduce

Issues without reproduction steps or code are likely to stall.

  1. git clone https://github.com/LayMui/ahuaAppTesting
  2. cd ahuaAppTesting
  3. yarn
  4. yarn ios
  5. yarn android
  6. ...

Describe what you expected to happen:

  1. Runtime error
  2. error: Error: Unable to resolve module ../fabric/NativeSvgRenderableModule from ~/dev/app/node_modules/@xxx/xxx-react-native/index.cjs.js:

None of these files exist:

  • node_modules/@xxx/fabric/NativeSvgRenderableModule(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.svg|.native.svg|.svg)
  • node_modules/@xxx/fabric/NativeSvgRenderableModule/index(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.svg|.native.svg|.svg)
    2170 | } = options || {};
    2171 | const handle = require$$0$1.findNodeHandle(this.root);

2172 | const RNSVGRenderableModule = require('../fabric/NativeSvgRenderableModule').default;

Short, Self Contained, Correct (Compilable), Example

If you are having a problem with some code and seeking help, preparing a Short, Self Contained, Correct Example (SSCCE) is very useful. But what is an SSCCE?

It is all in the name, really. Take a look at each part. The version prepared for others to see should be:

Short (Small) - Minimise bandwidth for the example, do not bore the audience.
Self Contained - Ensure everything is included, ready to go.
Correct - Copy, paste, (compile,) see is the aim.
Example - Displays the problem we are trying to solve.

http://www.sscce.org/

@bohdanprog bohdanprog added the Missing repro This issue need minimum repro scenario label Jun 12, 2024
@bohdanprog
Copy link
Member

Hello @LayMui,
Can you share the example to reproduce that issue?
Thank you.

@bohdanprog bohdanprog added the Close when stale This issue is going to be closed when there is no activity for a while label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

2 participants