Expo build
runchevski opened this issue · comments
Expo build fails with the follwing error:
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",
...
}
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!