Hello. Wonder whether anyone has faced this issue and may be able to help? I have followed instructions on adding Stacks to my expo react native ReScript project. The code compiles when running bsb -make-world -w
However when running yarn start i get the following error:
Unable to resolve module ./Stacks_utils from /home/tomo/Development/Native/Milo/node_modules/@mobily/stacks/src/Stacks_utils.bs.js:
None of these files exist:
- node_modules/@mobily/stacks/src/Stacks_utils(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
- node_modules/@mobily/stacks/src/Stacks_utils/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
6 | import * as Belt_Option from "bs-platform/lib/es6/belt_Option.js";
7 | import * as ReactNative from "react-native";
8 | import * as Stacks_utils from "./Stacks_utils";
| ^
9 | import * as Style$ReactNative from "rescript-react-native/src/apis/Style.bs.js";
10 |
11 | function normalizeResponsiveProp(prim) {
PACKAGE.JSON
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"re:build": "bsb -make-world",
"re:watch": "bsb -make-world -w",
"re:build-clean": "bsb -clean-world -make-world"
},
"dependencies": {
"@mobily/stacks": "^1.1.5",
"@rescript-bindings/expo": "^40.3.2",
"@rescript/react": "^0.10.3",
"expo": "~41.0.1",
"expo-status-bar": "~1.0.4",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-web": "~0.13.12",
"rescript-react-native": "^0.64.3",
"wonka": "^4.0.15"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"bs-platform": "^9.0.2",
"gentype": "^3.48.0",
"rescript": "^9.1.2"
},
"private": true
}
BSCONFIG.JSON
{
"name": "my-rescript-expo-app",
"reason": {
"react-jsx": 3
},
"bsc-flags": ["-bs-super-errors"],
"bs-dependencies": [
"@mobily/stacks",
"@rescript/react",
"rescript-react-native",
"@rescript-bindings/expo",
"wonka"
],
"sources": [
{
"dir": "src"
}
],
"suffix": ".bs.js",
"refmt": 3,
"package-specs": {
"module": "es6",
"in-source": true
},
"gentypeconfig": {
"language": "typescript",
"shims": {
"ReasonReact": "ReactShim"
}
}
}