When using echarts@^6.0.0 (which depends on zrender@^6) inside a React Native project (react-native@0.79.4), Metro shows repeated warnings about invalid package.json configuration in zrender.
Example warnings:
WARN The package .../node_modules/zrender contains an invalid package.json configuration.
Reason: The resolution for ".../node_modules/zrender/lib/core/platform" defined in "exports"
is .../node_modules/zrender/lib/core/platform, however this file does not exist.
Falling back to file-based resolution.
...
This happens for several subpaths such as:
- lib/core/platform
- lib/zrender
- lib/svg/helper
- lib/graphic/Path
- lib/graphic/Image
- lib/graphic/TSpan
- lib/canvas/dashStyle
- lib/svg/mapStyleToAttrs
Metro (the React Native bundler) now validates the "exports" field by default and warns when subpaths point to non-existent files. It then falls back to file-based resolution so the app still works, but the warnings are noisy and could break if Metro ever removes the fallback.
Steps to reproduce
- Create a RN 0.79 project.
- Install @wuba/react-native-echarts@^2.0.3 and echarts@^6.0.0.
- Run react-native start.
- Observe Metro warnings about invalid exports in zrender.
Expected
"exports" paths in zrender should match actual published files, so Metro (and other bundlers) resolve cleanly without warnings.
Environment
React Native: 0.79.4
echarts: 6.0.0
zrender: 6.x (installed via echarts)
@wuba/react-native-echarts: 2.0.3
When using echarts@^6.0.0 (which depends on zrender@^6) inside a React Native project (react-native@0.79.4), Metro shows repeated warnings about invalid package.json configuration in zrender.
Example warnings:
This happens for several subpaths such as:
Metro (the React Native bundler) now validates the "exports" field by default and warns when subpaths point to non-existent files. It then falls back to file-based resolution so the app still works, but the warnings are noisy and could break if Metro ever removes the fallback.
Steps to reproduce
Expected
"exports" paths in zrender should match actual published files, so Metro (and other bundlers) resolve cleanly without warnings.
Environment
React Native: 0.79.4
echarts: 6.0.0
zrender: 6.x (installed via echarts)
@wuba/react-native-echarts: 2.0.3