one icon indicating copy to clipboard operation
one copied to clipboard

Package Compatibility

Open christianjuth opened this issue 11 months ago • 9 comments
trafficstars

This issue aims to outline all the package compatibility issues with One as One approaches it's stable release.

I will update the issue as I become aware of other packages causing issues.


Expo packages

Package Description of Issue Tested Version(s) Reproduce Link Fixed
expo-image When I run yarn dev I get "The JSX syntax extension is not currently enabled" caused by expo using .js files instead of .jsx.
expo-blur When I run yarn dev I get "The JSX syntax extension is not currently enabled" caused by expo using .js files instead of .jsx. 13.0.2 1.1.341
expo-asset #301
@lexical/react #303

In theory, we should be able to fix these using One's Vite config deps (see docs). Some messages on One Discord suggest there might be a second layer to this issue.


Misc

Package Description of Issue Tested Version(s) Reproduce Link Fixed
react-native-reanimated-carousel "x Build failed in 6.52s, error [vite:json] [plugin vite:json] virtual:rn-internals:react-native/package.json: Failed to parse JSON file."

christianjuth avatar Dec 09 '24 19:12 christianjuth

expo-blur should work now with the fixes included in 1.1.341 👍

zetavg avatar Dec 13 '24 18:12 zetavg

Is there an exposed api that will allow people to get their own package support working without waiting for official support?

clayrisser avatar Dec 14 '24 03:12 clayrisser

I guess that's what the deps config is for.

clayrisser avatar Dec 14 '24 03:12 clayrisser

@lexical/react should work now with 1.1.344

natew avatar Dec 16 '24 22:12 natew

expo-image was causing an issue related to expo-modules-core, but the following vite.config.ts fixed it.

export default {
  plugins: [
    one(),
    tamaguiPlugin(),
  ],
  resolve: {
    alias: {
      "expo-modules-core": path.resolve(
        __dirname,
        "node_modules/expo-modules-core/",
      ),
    },
  },
} satisfies UserConfig;

christianjuth avatar Dec 26 '24 03:12 christianjuth

@natew should one patch expo-linear-gradient by default? I am doing this to make it work on the web.

      deps: {
        'expo-linear-gradient': {
          '**/*.js': ['flow', 'swc'],
        },
      },

SpaghettiC0des avatar Dec 26 '24 19:12 SpaghettiC0des

Yes i think we'd probably want that, likely we need to patch all expo module somehow, I want to set up a better way to do this internally automatically, but for now I'd accept a pr to dePatches doing this.

natew avatar Dec 26 '24 21:12 natew

@natew I can submit a PR for this.

SpaghettiC0des avatar Dec 27 '24 16:12 SpaghettiC0des

I think a separate issue to keep track of the patched expo modules would be better.

SpaghettiC0des avatar Dec 27 '24 16:12 SpaghettiC0des

Will the new Metro Mode eliminate all these package compatibility issues?

rommyarb avatar Oct 03 '25 03:10 rommyarb