Repository navigation
Closed
Labels
BugStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
When I run a local script to build an .ipa I consistently get the following error in Metro Packager console:
jest-haste-map: Haste module naming collision: react-native
The following files share their name; please adjust your hasteImpl:
* <rootDir>/node_modules/react-native/package.json
* <rootDir>/ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.json
I have tried doing an rm -rf ios/build but I continue to get the above error.
React Native version:
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 105.17 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 26.0.2, 27.0.3, 28.0.3
System Images: android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
@react-native-community/cli: 2.9.0 => 2.9.0
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
- download: https://www.dropbox.com/s/9ic96cz9qupi97j/ipa_release_2.0.zip?dl=0
- run npm install
- go to node_modules:
node_modules/react-native-immediate-phone-call/android/build.gradle AND
node_modules/react-native-swipe-view/android/build.gradle
change compileSdkVersion to 28
change targetSdkVersion to 27
- Run npx jetify && npm run build
- It will prompt you for codesigning password, just give it the password to get into your machine.
Describe what you expected to happen:
The script executed with npm run build should successfully create an apk that gets stored inside of Dist/ folder, but the .ipa is not generated because of the above error.
https://www.dropbox.com/s/9ic96cz9qupi97j/ipa_release_2.0.zip?dl=0
Reacted by Milt
Metadata
Metadata
Assignees
Labels
BugStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Activity
Frindecent commentedon Sep 10, 2019
you might be importing package.json in your js code. Remove that import and then try to start your bundler again.
ldco2016 commentedon Sep 10, 2019
@Frindecent , I have found that
package.jsonis being required in 521 files, but I will guess I should remove it from the scripts that is attempting to generate the apks and ipas.Frindecent commentedon Sep 10, 2019
You donot need to remove package.json from the dependencies or packages.. lets say ‘react-native-vector-icons’.
Just remove the import of package.json from the original code you wrote for your app. You might be importing it for app version or maybe app name
ldco2016 commentedon Sep 10, 2019
@Frindecent , the only place where I saw in our own code that
package.jsonis being imported is:e2e/init.js:scripts/ios/build.js:scripts/build.js:I could not comment it out from the last one because it would error out.
Results:
Still getting in Metro Packager:
Frindecent commentedon Sep 10, 2019
You will need to comment it out from the last one too.. check what is the version in package.json.. and then after commenting write
Const version = “whatever the version is” . So you wont have errors.. and next time while changing the version of the app you will change from here too
ldco2016 commentedon Sep 11, 2019
@Frindecent , I did the following refactor to
scripts/build.js:I still get the following error when running
npm run android:The only way I am able to get the scripts working is by running:
rm -rf ios/build && GitVersion_BranchName="release/abcd" npm run build, so I have to removeios/builddirectory first.To be clear this does not resolve it, it eventually creates the
/ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.jsonthis all over again.ldco2016 commentedon Sep 17, 2019
The way I had to resolve this was by first running
rm /ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.jsonstale commentedon Dec 16, 2019
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
stale commentedon Dec 23, 2019
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.