Skip to content

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

@emptyopen

Description

@emptyopen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: ImageStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions