Open maxckelly opened 3 days ago
Hi there! I understand you're encountering a module resolution error while trying to use @trigger.dev/react-hooks in your React Native project.
The error you're seeing suggests there's a compatibility issue between the React Native environment and the @trigger.dev packages. Looking at the underlying issue, this is happening because @trigger.dev/react-hooks is trying to import from @trigger.dev/core/v3, but this dependency isn't being resolved correctly in the React Native environment.
Here's what I suggest to resolve this:
First, make sure you have all the necessary dependencies installed:
npm install @trigger.dev/react-hooks@3.2.1 @trigger.dev/core@3.2.1
Since you're using React Native, you'll need to add the core package explicitly to your dependencies in package.json:
{
"dependencies": {
"@trigger.dev/react-hooks": "^3.2.1",
"@trigger.dev/core": "^3.2.1"
}
}
After updating your dependencies, clear your React Native bundler cache:
# For Metro bundler
npx react-native start --reset-cache
Important considerations:
If you're still experiencing issues after trying these steps, please let me know:
The error appears to be a module resolution issue rather than a functional one, so once we get the packages properly resolved, you should be able to use the React hooks as documented.
Let me know if you need any clarification or run into other issues!
Provide environment information
"@trigger.dev/react-hooks": "^3.2.1", React native
Describe the bug
Hi - I'm trying to use the react hooks as stated in the documentation but whenever I try to call authentication or subscribe I get the below error. Can someone please help.
Reproduction repo
https://github.com/triggerdotdev/trigger.dev
To reproduce
Build react native application and install package as stated in docs
Additional information
No response