Skip to content

cannot use third-party react native components #12

@anchetaWern

Description

@anchetaWern

Not sure if this is a problem with the starter kit or the react native for web project itself but I can't get any react native package to work. Here are a few one's that I tried:

Looking at the source code for each one, I don't think any of these has links to the native platform so I'm not sure why it wouldn't work.

There are two kinds of errors that shows up in the console whenever I import a react native package:

  • cannot find module foo
Uncaught Error: Cannot find module "react-native-grid-component"
  • unexpected token import
bundle.js: Uncaught SyntaxError: Unexpected token import

Specifically, it's complaining about this line:

import Row from './Components/Row';

It seems it doesn't know where to load the files. I got it when I tried to use react native easy grid

Also whenever I try to install a package I always get this error:

UNMET PEER DEPENDENCY file-loader@*

That's why I installed file-loader

But there's also this error:

UNMET PEER DEPENDENCY react-native@>=0.33.0

I got the above error when I tried to install lodash and react-native-grid-component. But the only library that I got to work is lodash.

Is this expected? the only npm packages that would work are the one's that can be used in the browser and node.js?

Let me know if you need more details, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions