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

Trying to link, getting a font error. Result of "undefined is not an object" imagepicker error #25115

Closed
emptyopen opened this issue Jun 1, 2019 · 3 comments
Labels
Bug Component: Image Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@emptyopen
Copy link

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

  1. Add Rajdhani-Regular.ttf file to assets/fonts/

Describe what you expected to happen:
ImagePicker works

@johnwnowlin
Copy link

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
Copy link

stale bot commented 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 stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 17, 2019
@stale
Copy link

stale bot commented 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.

@stale stale bot closed this as completed Sep 24, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: Image Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants