-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Module not found: Can't resolve 'react-art' #903
Comments
It's set as a You have 2 choices:
// never do this
import ReactNative from 'react-native';
// do this instead
import {View, Text} from 'react-native'; The downside is that you will have to run transpiled code on the server. more info on peer dependencies here Maybe this info should be added to the Readme or should just have the instructions to install |
The readme says to install this peer dependency as needed. The npm log will also list peer dependencies |
Tha 'react-art' package is out of date. Last updated a year ago. It throws an error. |
Any updates? |
I follow the package.json, add the peer dependencies: "peerDependencies": {
"react": "16.0.0-alpha.12",
"react-dom": "^16.3.1",
"react-art": "~16.0.0"
} It still not working |
I added the "react-art" in dependencies that worked for me.
|
We are using create-react-app with Typescript and don't have the luxury of adding a babel plugin without ejecting, which is a steep price to pay. In our context, adding react-art was mandatory for us to get the react-native-web working. |
@koulmomo @necolas
But this gives me an error that 'react-art' cannot be resolved. I tried running We always use named imports for react-native, never an umbrella import. Also, could you explain what was meant by "The downside is that you will have to run transpiled code on the server."? |
I'm also having this problem. ERROR in /node_modules/react-native-web/dist/exports/ART/index.js
Module not found: Error: Can't resolve 'react-art' in '//node_modules/react-native-web/dist/exports/ART'
@ //node_modules/react-native-web/dist/exports/ART/index.js 1:0-27 1:42-45
@ //node_modules/react-native-web/dist/index.js
@ multi react react-native-web
"dependencies": {
"react": "16.5.0",
"react-dom": "16.7.0",
"react-native": "0.57.1",
"react-native-web": "^0.10.0",
...
},
"peerDependencies": {
"react-art": "^16.8.2"
...
},
"devDependencies": {
"babel-loader": "^8.0.5",
"babel-plugin-react-native-web": "^0.9.6",
"webpack": "4.24.0",
"webpack-cli": "^3.2.3",
...
} |
hhh |
I was having this issue:
and it helped me to do
Now works. Thanks for the hint. |
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and
if a minimal demo of the problem via Glitch or similar (template:
https://glitch.com/edit/#!/react-native-web-playground).
create-react-app
andcreate-react-native-app
app withyarn add react react-dom react-native-web
react-scripts start
to build the websiteWhat is the expected behavior?
yarn add react-art
required? I can only get rid of the error if I include the dependencyEnvironment (include versions). Did this work in previous versions?
The text was updated successfully, but these errors were encountered: