By following the above installation guide, I got the problem:
$ npx rescript
rescript: [3/3] src/Test.cmj
FAILED: src/Test.cmj
We've found a bug for you!
/Users/jhsiao/games/try_res/mini_wjt/src/Test.res:3:4-6
1 │ @react.component
2 │ let make = () => {
3 │ <div> {React.string("Hello World")} </div>
4 │ }
The value div can't be found
FAILED: cannot make progress due to previous errors.
DZakh
December 21, 2022, 6:58am
2
Could you show your package.json and bsconfig.json?
package.json:
{
“name”: “mini_wjt”,
“version”: “0.1.0”,
“private”: true,
“dependencies”: {
“@rescript /react”: “^0.10.3”,
“@testing-library /jest-dom”: “^5.16.5”,
“@testing-library /react”: “^13.4.0”,
“@testing-library /user-event”: “^13.5.0”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
“react-scripts”: “5.0.1”,
“rescript”: “^10.0.1”,
“web-vitals”: “^2.1.4”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”,
“res:build”: “rescript”,
“res:dev”: “rescript build -w”
},
“eslintConfig”: {
“extends”: [
“react-app”,
“react-app/jest”
]
},
“browserslist”: {
“production”: [
“>0.2%”,
“not dead”,
“not op_mini all”
],
“development”: [
“last 1 chrome version”,
“last 1 firefox version”,
“last 1 safari version”
]
}
}
bsconfig.json:
{
“name”: “mini-wjt”,
“sources”: [
{
“dir”: “src”,
“subdirs”: true
}
],
“package-specs”: [
{
“module”: “es6”,
“in-source”: true
}
],
“suffix”: “.bs.js”,
“jsx”: { “version”: 4, “mode”: “classic” },
“bs-dependencies”: ["@rescript /react"]
}
DZakh
December 21, 2022, 1:17pm
5
You need to use the previous version of the instruction Installation | React .
Or install rescript@10.1.0
and @rescript/react@0.11.0
.