Closed hassankhan closed 6 years ago
Can you share the failing repo? Thanks!
Facing the same issue here. I found what is causing it and a workaround that do the trick:
Just replace a line in the metro-bundler-config-yarn-workspaces
lib with the following:
// path.resolve(from, '..', 'node_modules'),
path.resolve(from, '..', '..', 'node_modules'),
I think this is because my workspaces are located inside a packages
folder
Can we add a new parameter (maybe optional to keep it backward compatible) to the getConfig
function in order to provide the node_modules
root folder?
const app = path.resolve(__dirname)
const root = path.resolve(__dirname, '..', '..')
getConfig(app, root)
If you agree I can create a PR.
Thanks!
Apologies @dariocravero, haven't had time time to share a repo, but congratulations @jpgarcia for finding the root cause of the issue!
Hey @jpgarcia, yeah, if that sorts it for you guys, happy to take a PR in for it! I guess the idea would be that path.resolve(from, '..', 'node_modules')
is a default for a nodeModules param, right? Maybe that can be an object as the second argument getConfig
? Thanks!
I tried making these changes in my project, following @jpgarcia's advice but still end up with this. Any idea what it could be?
Putting debug comments in rn-cli.config.js seems to generate the correct paths, so why still failing with seemingly no error?
Edit: This is a link to the repo where I am having trouble in the native
package https://github.com/Connorelsea/remix-platform
Eventually got this working using @jpgarcia's instructions. Nice work, would love a PR
Hey @dariocravero did you have time to look the PR I sent? any chances to get this merged?
Let me know if you have any feedback, thanks!
Amazing! Thanks @jpgarcia, merged!