Repository navigation
Description
I have added some fonts to my project. Now, I'm trying to get an ImagePicker working but it seems it requires me to "link" the project, I don't really know what that means. However, when I go to run react-native link, I'm getting this error:
rnpm-install ERR! Something went wrong while linking. Error: Attempt to change mapping for "otf" extension from "font/otf" to "font/opentype". Pass force=true to allow this, otherwise remove "otf" from the list of extensions for "font/opentype".
Please file an issue here: https://github.com/facebook/react-native/issues
Attempt to change mapping for "otf" extension from "font/otf" to "font/opentype". Pass force=true to allow this, otherwise remove "otf" from the list of extensions for "font/opentype".
Error: Attempt to change mapping for "otf" extension from "font/otf" to "font/opentype". Pass `force=true` to allow this, otherwise remove "otf" from the list of extensions for "font/opentype".
at Mime.define (C:\Users\Takkeezi\Documents\react native\Fable\node_modules\mime\Mime.js:54:15)
at Object.<anonymous> (C:\Users\Takkeezi\Documents\react native\Fable\node_modules\react-native\local-cli\link\groupFilesByType.js:18:6)
at Module._compile (internal/modules/cjs/loader.js:759:30)
at Module._compile (C:\Users\Takkeezi\Documents\react native\Fable\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:770:10)
at Object.newLoader [as .js] (C:\Users\Takkeezi\Documents\react native\Fable\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
I've tried react-native link forced=true but that has the same result.
React Native version:
React Native Environment Info:
System:
OS: Windows 10
CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
Memory: 7.97 GB / 15.93 GB
Binaries:
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338
Steps To Reproduce
- Add Rajdhani-Regular.ttf file to assets/fonts/
Describe what you expected to happen:
ImagePicker works
Activity
johnwnowlin commentedon Jun 19, 2019
I had to change @react-native-community/cli/command/link/groupFilesByType.js where it called _mime().default.define and add a true as the second parameter.
stale commentedon Sep 17, 2019
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stale commentedon Sep 24, 2019
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.