Skip to content

Webpack doesn't like types. Failed to compile. #693

@haydenlinder

Description

@haydenlinder

I am using expo ~39.0.2 and react native 0.61.4. I created the app using expo init myapp.
I installed this library and used the following code in App.js:

import RNFetchBlob from 'rn-fetch-blob';

My app crashes and I get this error:

/Users/hayden/Desktop/projects/myapp/node_modules/rn-fetch-blob/index.js 12:12
Module parse failed: Unexpected token (12:12)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|   AppState,
| } from 'react-native'
> import type {
|   RNFetchBlobNative,
|   RNFetchBlobConfig,

How do I fix? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions