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.
via msqar
No comments:
Post a Comment