Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

File not found dependency error while running react native ios app

$
0
0

So I wanted to install a dependency using npm which is react-native-router-flux, but since it wasn't working due to the compatibility versions with react & react-native, it was breaking my project app. So I removed it from the package.json file.

Tried removing it by doing:

npm uninstall --save react-native-router-flux

Even tried to remove it manually from the package.json file, but for some reason, now it looks like my whole project is broken due to that.Now whenever I do npm start

This is what is being displayed in my terminal:

error: bundling: Error: ENOENT: no such file or directory, open '/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js'    at Error (native)    at Object.fs.openSync (fs.js:634:18)    at Object.fs.readFileSync (fs.js:502:33)    at Module._readSourceCode (/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native/packager/src/node-haste/Module.js:200:29)    at Module._getCacheProps (/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native/packager/src/node-haste/Module.js:420:29)    at Module._readFromTransformCache (/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native/packager/src/node-haste/Module.js:376:29)    at Module.readCached (/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native/packager/src/node-haste/Module.js:363:25)    at Promise.resolve.then (/Users/marian-mac/Documents/dev/example/myapp/node_modules/react-native/packager/src/node-haste/DependencyGraph/ResolutionRequest.js:167:29)    at process._tickCallback (internal/process/next_tick.js:103:7)Bundling `index.ios.js`  94.0% (2941/3033)

I tried to rm -rf /node_modules 100 times and npm install another 100 times and this keeps failing and failing, I can't understand where is trying to access that file! if it was removed!!!

This is my package.json now:

{"name": "myapp","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"moment": "^2.18.1","native-base": "^2.1.3","react": "16.0.0-alpha.6","react-native": "0.44.0","react-native-flags": "^1.0.0"  },"devDependencies": {"babel-jest": "19.0.0","babel-preset-react-native": "1.9.1","jest": "19.0.2","react-test-renderer": "16.0.0-alpha.6"  },"jest": {"preset": "react-native"  }}

Is also throwing WARNINGS for versions and other things too:

npm WARN native-base-shoutem-theme@0.1.3 requires a peer of react@>=15.1.0 but none was installed.npm WARN @shoutem/animation@0.8.10 requires a peer of react@^15.0.0 but none was installed.npm WARN react-static-container@1.0.1 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.

This is being thrown for native-base dependency:

 UNMET PEER DEPENDENCY react@^0.13.0 || ^0.14.0 || ^15.0.0

Can anyone help me? this is driving me crazy, been 'fighting' with this for hours now and I can't continue with my app.

Thanks in advance.


EDIT:

After changing some versions for react, react-native and native-base. Still having warnings and looks like the packager is trying to access a react-native file within react-native-route-flux.

1) This is my current package.json

{"name": "myapp","version": "0.0.1","private": true,"scripts": {"start": "node node_modules/react-native/local-cli/cli.js start","test": "jest"  },"dependencies": {"moment": "^2.18.1","native-base": "^2.1.3","react": "16.0.0-alpha.3","react-native": "^0.43.0","react-native-flags": "^1.0.0"  },"devDependencies": {"babel-jest": "19.0.0","babel-preset-react-native": "1.9.1","jest": "19.0.2","react-test-renderer": "16.0.0-alpha.6"  },"jest": {"preset": "react-native"  }}

2) These are the warnings:

npm WARN react-native@0.43.4 requires a peer of react@16.0.0-alpha.6 but none was installed.npm WARN native-base-shoutem-theme@0.1.3 requires a peer of react@>=15.1.0 but none was installed.npm WARN @shoutem/animation@0.8.10 requires a peer of react@^15.0.0 but none was installed.npm WARN react-static-container@1.0.1 requires a peer of react@^0.13.0 || ^0.14.0 || ^15.0.0 but none was installed.npm WARN react-test-renderer@16.0.0-alpha.6 requires a peer of react@^16.0.0-alpha.6 but none was installed.

Also throws some UNMET PEER DEPENDENCY on native-base:

├─┬ native-base@2.1.3│├─┬ @shoutem/animation@0.8.10││├── hoist-non-react-statics@1.2.0││└── lodash@4.17.4│├── blueimp-md5@2.7.0│├── clamp@1.0.1│├─┬ color@0.11.4││├── clone@1.0.2││├─┬ color-convert@1.9.0│││└── color-name@1.1.2││└── color-string@0.3.0│├─┬ fs-extra@2.1.2││└── jsonfile@2.4.0│├── lodash@4.11.2│├── native-base-shoutem-theme@0.1.3│├── print-message@2.1.0│├── UNMET PEER DEPENDENCY react@^15.0.0│├── react-native-drawer@2.3.0│├── react-native-easy-grid@0.1.7│├── react-native-keyboard-aware-scroll-view@0.2.7│├─┬ react-native-scrollable-tab-view@0.7.4││├── UNMET PEER DEPENDENCY react@^0.13.0 || ^0.14.0 || ^15.0.0││└── react-static-container@1.0.1│├── react-native-vector-icons@4.0.1│├─┬ react-tween-state@0.1.5││└─┬ raf@3.3.2││└── performance-now@2.1.0│└── tween-functions@1.2.0├─┬ UNMET PEER DEPENDENCY react@16.0.0-alpha.3

And in console when run, throws the red screen error in the simulator from XCode saying:

No Dimension set for key window

Looks it's a known issue according to his github. But damn, I don't want react-native-router-flux anymore, I don't even have it in my package.json nor installed and is still causing trouble, this dependency is a virus.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>