Metro package problem
Romick2005 opened this issue · 2 comments
Hi,
Can you please explain why we have following hard coded lines in re-natal.coffee:
findPackagerFileToPatch = () ->
files = [
"node_modules/metro/src/Server/index.js",
"node_modules/metro-bundler/src/Server/index.js",
"node_modules/metro-bundler/build/Server/index.js",
While in package.json there are no dependency on metro (package was renamed from metro-bundler to metro and throws error on building app).
Is there any reason not to add metro ta package.json? and also remove metro-bundler lines?
Hi, this code is used by command re-natal enable-source-maps
. It should not cause any problems elsewhere. Do you call that command and it fails or is it something esle what results in error?
Hi,
Yes I am calling "re-natal enable-source-maps" and return an error:
module metro-bundler not found please install it with npm install metro-bundler.
But actually metro was installed during npm i status-react (branch "desktop") and there in package.json:
{
...
"react-native": "git+https://github.com/status-im/react-native-desktop.git#master",
"re-natal": "git+https://github.com/status-im/re-natal.git#master",
...
}
And react-native has a dependency on new "metro" not to the old one "metro-bundler".
Package.json from react-native-desktop:
{
...
"metro": "^0.24.7",
"metro-core": "^0.24.3",
...
}