My current .gitignore file has:
# OSX
# .DS_Store
# Xcode
# build/
*.pbxuser !default.pbxuser
*.mode1v3 !default.mode1v3
*.mode2v3 !default.mode2v3
*.perspectivev3 !default.perspectivev3 xcuserdata
*.xccheckout
*.moved-aside DerivedData
*.hmap
*.ipa
*.xcuserstate project.xcworkspace
# Android/IntelliJ
# build/ .idea .gradle local.properties
*.iml
# node.js
node_modules/ npm-debug.log yarn-error.log
# BUCK buck-out/ \.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
#React Files
android/
ios/
Then, I did the usual.
git add .
git commit -am "First commit"
git push -u origin master
It got loaded up.
When the team member did git clone
and then did npm install
It did not load anything!
package.json
{
"name": "gmxWorldWide",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.4.1",
"react-native": "0.56.0",
"watchman": "^1.0.0"
},
"devDependencies": {
"babel-jest": "23.4.0",
"babel-preset-react-native": "5",
"jest": "23.4.1",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}
}
It does not install anything.
I come from php background where composer.json would be replicated across the team and composer install would do the trick.
How is it different and what can be done to enable npm install do the work?
EDIT:
The code was create using react-native init command