1

I cloned https://github.com/oblador/react-native-progress

On the example folder:

npm i react-native run-ios 

But i got a error,this is the error screenshoot link: Unable to resolve module react

This is the code:

import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Animated, Easing, View, ViewPropTypes, } from 'react-native'; 

Why can't my react module not be resolved but react native module can?

1 Answer 1

1

Example has error on building node dependencies inside package.json file

 "dependencies": { "react": "16.0.0-alpha.12", "react-native": "0.47.2", "react-native-progress": "file:../" // error }, 

to fix that

  1. inside Example folder run npm uninstall react-native-progress
  2. after uninstall run npm install react-native-progress --save

then run your example app normally

Sign up to request clarification or add additional context in comments.

2 Comments

But why https://github.com/react-community/react-native-image-picker/blob/develop/Example/package.json can run successfully?
react-native-progress has dependencies so it will search in node_modules but it will confuse node where is the node_modules folder react-native-image-picker has no dependencies so it will run smoothly

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.