Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 26, 2025

  • Analyze repository structure and understand the issue
  • Identify that package.json exports field is missing entries for ./skiaChart and ./svgChart subpaths
  • Understand that skiaChart.js and svgChart.js files exist and are properly built in lib/ directory
  • Add exports entries for ./skiaChart and ./svgChart in package.json
  • Fix import paths in skiaChart.js and svgChart.js to use .js extensions
  • Fix TypeScript declaration file paths in skiaChart.d.ts and svgChart.d.ts
  • Test the fix to ensure imports work without warnings
  • Verify TypeScript support works correctly
  • Run tests and linting to ensure no regressions

Summary: Fixed the expo warning "Attempted to import the module '...skiaChart' which is not listed in the 'exports'" by adding proper export entries in package.json for ./skiaChart and ./svgChart subpaths. Also corrected import paths to use proper file extensions and fixed TypeScript declaration paths to match the built directory structure.

The fix enables proper individual imports as documented in the Advanced Guides:

import SkiaChart, { SkiaRenderer } from '@wuba/react-native-echarts/skiaChart';
import SvgChart, { SVGRenderer } from '@wuba/react-native-echarts/svgChart';
Original prompt

This section details on the original issue you should resolve

<issue_title>Import inidividually expo warning</issue_title>
<issue_description>following the instructions in Advanced Guides > Import individually i get the following warning message

WARN Attempted to import the module "/.../node_modules/@wuba/react-native-echarts/skiaChart" which is not listed in the "exports" of "/.../node_modules/@wuba/react-native-echarts" under the requested subpath "./skiaChart". Falling back to file-based resolution. Consider updating the call site or asking the package maintainer(s) to expose this API.

and typescript error TS2307: Cannot find module '@wuba/react-native-echarts/skiaChart' or its corresponding type declarations.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #263

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI requested a review from zhiqingchen September 26, 2025 06:06
@zhiqingchen zhiqingchen marked this pull request as ready for review September 26, 2025 06:10
@zhiqingchen zhiqingchen merged commit c41ef95 into main Sep 26, 2025
4 checks passed
@zhiqingchen zhiqingchen deleted the copilot/fix-52253df8-0ee3-4123-81a1-a834323e6bbf branch September 26, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import inidividually expo warning

2 participants