Comments (3)
I seem to have found the issue, but I am still tracing why it is happening. When the iOS container is generated, it is not installing the correct dependencies from the package.json file. The file /.ern/containergen/out/ios/yarn.lock
actually says that mkdirp is a dependency of metro:
[email protected], metro@^0.66.1:
version "0.66.2"
resolved "https://registry.yarnpkg.com/metro/-/metro-0.66.2.tgz#f21759bf00995470e7577b5b88a5277963f24492"
integrity sha512-uNsISfcQ3iKKSHoN5Q+LAh0l3jeeg7ZcNZ/4BAHGsk02erA0OP+l2m+b5qYVoPptHz9Oc3KyG5oGJoTu41pWjg==
dependencies:
...
**mkdirp "^0.5.1"**
...
The metro-cache package specifies the same dependency. And the yarn.lock file actually shows the correctly resolved dependency:
mkdirp@^0.5.1:
version "0.5.6"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6"
integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==
dependencies:
minimist "^1.2.6"
However, when the container generation finishes, the actually installed version of mkdirp is 3.0.0, which removed the default exports. So at some point the container generation for iOS is installing the wrong dependency, and that is what is breaking everything. If we run yarn install
after the initial creation of the container, and then start the iOS emulator, it also works without a problem. I will keep debugging to see where the mismatch is happening.
@Karthiccc23 @friederbluemle any ideas on where to look?
from electrode-native.
Seems like the correct version of mkdirp (0.5.6) gets installed briefly, then it gets overwritten by the pod install command:
✔ Running pod install --verbose 7s
The pod install command is removing the existing one and installing the latest version.
from electrode-native.
The issue is happening on the IosGenerator.ts
file. For our version of RN (0.66.5), it is using the code react-native-codegen. After the pod install command runs, the generator is removing all libraries that are not RN related. This removes the correct mkdirp module.
Later during the react-native-codegen function, it manually adds the mkdirp dependency again without checking the required version on the main packages.json file. At this point the latest version of the mkdirp library that contains breaking changes is added and then merged into the node_modules folder.
Would it be better to not remove the mkdirp library from the initial node_modules or to ensure we check for a particular version on the package.json file to install the correct version (if one exists)?
@friederbluemle @belemaire @Karthiccc23
from electrode-native.
Related Issues (20)
- Module ElectrodeBridgeTransceiver requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup`.
- Support for main branch naming HOT 1
- Random unit test failures on CI
- ern code-push release doesn't recognize custom application name in cauldron
- Apply patch for react-native version HOT 3
- FBAudienceNetwork in container and client application causes crash
- CVE-2022-23812: YOUR CODE IS INFECTED WITH MALICIOUS DEPENDENCY - node-ipc HOT 1
- ern run-android failing as react component not found even babel plugin "module-resolver" is there
- An error occurred: At least one MiniApp or JS API implementation is needed to generate a composite HOT 7
- run ern run-ios this command, i got a error HOT 2
- How Unity to interact electrode-native ? HOT 1
- Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported (Node.js 17+)
- [Question] - ElectrodeContainer - Why Objective-C & Swift ?
- Error while creating miniapp
- Error while try to add native app on cauldron
- Add `.cjs` support in the generated Metro config
- Still using node-ipc instead of the fork
- Detect cocoapods issue HOT 2
- perfrom "ern run-android" in new miniAPP, error:Couldn't find 'react-native-electrode-bridge' matches 1.0.0' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electrode-native.