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

build fail Can't resolve 'react-native' #20

Open
9paradox opened this issue Apr 25, 2020 · 3 comments
Open

build fail Can't resolve 'react-native' #20

9paradox opened this issue Apr 25, 2020 · 3 comments

Comments

@9paradox
Copy link

Issue Description

Error: Can't resolve 'react-native'

Steps to Reproduce / Code Snippets

npm run watch

ERROR in ./node_modules/react-web-gifted-chat/dist/index.js
Module not found: Error: Can't resolve 'react-native'

Expected Results

it should use 'react-native-web' instead of 'react-native' ?

Additional Information

  • Nodejs version: v10.16.3
  • React version: 16.2.0
  • react-web-gifted-chat version: 0.6.7
  • Browser(s) (Chrome, etc.): Chrome
@krishna-mastree
Copy link

@9paradox did you find any solution?

@9paradox
Copy link
Author

@9paradox did you find any solution?

i am able to build this by changing :

import * as RN from 'react-native';

to

import * as RN from 'react-native-web';

in files where react-native is used, like :
'node_modules\react-web-gifted-chat\index.d.ts'
'node_modules\react-web-gifted-chat\src\GiftedChat.js'
...

this is not at all the way to fix this, but for testing you can.

@miguflores
Copy link

@9paradox Did you had any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants