Closed billh0420 closed 1 year ago
Also, I notices that the rpm registry lists 12 dependencies for this package. But, the following were not installed:
I've just fixed a compilation error. But it was not what you mentioned. The error you mentioned looks strange, I don't understand what happens in your case. I would suggest you to install the project again, but start doing it from the command line and then open from VS code.
I successfully executed all the below commands just before writing this response:
git clone https://github.com/expln/rescript-utils.git
cd ./rescript-utils
npm install
npm run compile-with-deps-and-test
If everything is ok, then you may proceed with opening the project with VS code (File -> Open Folder... and select the "rescript-utils" folder created on the 1st step).
If you still have an error, please let me know.
Please, also note that metamath-lamp no longer depends on this project. However, you still may use it if you need some functionality in it - it contains a lot less of code and may be easier to experiment with.
A) @expln said "note that metamath-lamp no longer depends on this project." I didn't realize that. I downloaded a couple of days ago the zip version of metamath-lamp so that I could add some code to see how things worked. This was not linked to the repository (or my clone of your repository) since I had no intentions of uploading my changes (since my changes were for personal understanding of the code).
B) I wanted to learn how the ui worked in metamath-lamp. So I set up an initial project (called "game") and I then used npm to install the expln/utils package so that I could experiment with it. I did not clone expln/utils and then add my code: that didn't seem to be the normal way to handle a package. The package should go into "node_modules" folder and my code for "game" should go into the "src" folder.
C) Since this package is not used in metamath-lamp and I just installed it to learn how to use it for metamath-lamp, I won't pursue this any further. I now have to see how ui is now done in metamath-lamp.
Ok, that makes sense.
Just in case you need, please find a similar sequence of commands for metamath-lamp. The last command runs the app locally, on http://localhost:3000/ by default.
git clone https://github.com/expln/metamath-lamp.git
cd ./metamath-lamp
git checkout develop
npm install
npm run compile-with-deps
npm run compile-test-all-unit
npm run start
Since you are writing that you are new to javascript, I would advise you to start by understanding how React works. Without understanding React it will be difficult to understand how the ui works in metamath-lamp. The official React site https://react.dev/learn could be a good start point, however, there are a lot of other good resources in the Internet too.
I am closing this issue since looks like everything is resolved.
Am I doing something wrong? Note: I am new to rescript and javascript and vscode?
I installed this package using npm in vscode. When I clean and compile with deps, I get the following error:
Cleaning... 54 files. Cleaning... 236 files. Cleaning... 0 files.
Dependency on @rescript/react rescript: [38/38] src/legacy/ReactDOMRe.cmj rescript: [49/49] install.stamp Dependency on @expln/utils rescript: [108/166] src/main/react-mui-components/Expln_React_Row.cmj FAILED: src/main/react-mui-components/Expln_React_Row.cmj
We've found a bug for you! /Users/hale/ReScript/game-project/node_modules/@expln/utils/src/main/react-mui-components/Expln_React_Row.res:13:6-21
11 │ ~children:option=?
12 │ ) => {
13 │ <Expln_React_Grid ref=?gridRef container=true direction=#row ?justi
│ fyContent ?alignItems spacing ?style >
14 │ {switch children {
15 │ | Some(children) =>
The value createElement can't be found in Expln_React_Grid
rescript: [158/166] src/main/react-components/Expln_React_TextFileReader.cmj FAILED: src/main/react-components/Expln_React_TextFileReader.cmj