Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo build #237

Closed
runchevski opened this issue Jul 29, 2023 · 1 comment
Closed

Expo build #237

runchevski opened this issue Jul 29, 2023 · 1 comment

Comments

@runchevski
Copy link

Expo build fails with the follwing error:
image

I tried the fix in issue #234 but without any luck since the build is not being done locally and seems like Expo is ignoring the postinstall in the package.json, has anyone found any workaround for this?

Note: I tried taking the repo outside of the node_modules, replacing line 31 from provided to implementation and putting it in the parent directory, linking it in the package.json as local repo dependency, the build succeeds but the app crashes on start.

"dependencies": {
   ...
   "@terrylinla/react-native-sketch-canvas": "file:@terrylinla/react-native-sketch-canvas-master/package.json",
   ...
}

and

"scripts": {
   ...
   "preinstall": "npm install ./@terrylinla/react-native-sketch-canvas-master",
   ...
}
@runchevski
Copy link
Author

after a lot of digging I found a fix, if you are using npm ^10.24.1 the nodel_module inside the package.json should be referenced as:

"dependencies": {
   ...
   "@terrylinla/react-native-sketch-canvas": "file:./@terrylinla/react-native-sketch-canvas-master/package.json",
   ...
}

otherwise you just point to the folder without pointing to the package.json file:

"dependencies": {
   ...
   "@terrylinla/react-native-sketch-canvas": "file:./@terrylinla/react-native-sketch-canvas-master",
   ...
}

hope this helps!

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

No branches or pull requests

1 participant