You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,36 @@ We use `package.json` to call scripts from packages like so.
24
24
-`yarn build` - generates the esm and cjs versions of the reactus framework
25
25
-`yarn test` - runs the tests found in `reactus/tests`
26
26
27
-
Before running any scripts in terminal, make sure the session is using NodeJS 22. `nvm use 22`.
27
+
Before running any scripts in terminal, make sure the session is using NodeJS 22 or above.
28
+
29
+
## Node Setup
30
+
31
+
Before running `yarn build`, `yarn test`, or any other project script, make sure the shell is using Node.js `22` or newer.
32
+
33
+
Use the following lookup order:
34
+
35
+
1. Check whether `nvm` is installed.
36
+
2. If `nvm` is installed, try to locate the `nvm` directory that contains the Node binaries and use a Node 22+ binary from there.
37
+
3. If the `nvm` directory cannot be located, try to switch the shell directly with `nvm use 22`.
38
+
4. If `nvm` is not available or cannot provide Node 22+, try common OS-specific Node install paths.
39
+
5. If Node is still not found, inspect environment variables such as `PATH`, `NVM_DIR`, `NODE_HOME`, or similar variables that may point to the installation.
40
+
6. If after all of the above Node 22+ still cannot be found, stop the task and ask the user for the Node installation location.
41
+
42
+
Preferred process:
43
+
44
+
- First try to detect `nvm` with commands such as `command -v nvm` or by checking `NVM_DIR`.
45
+
- If `nvm` exists, prefer Node binaries under the `nvm` installation, commonly under:
46
+
-`$NVM_DIR/versions/node/`
47
+
-`~/.nvm/versions/node/`
48
+
- If a Node 22+ binary is found there, use that runtime for subsequent commands.
49
+
- If the folder cannot be resolved cleanly, fall back to `nvm use 22`.
50
+
- If `nvm` is unavailable, check common Node locations based on the OS, such as:
51
+
-`/usr/local/bin/node`
52
+
-`/opt/homebrew/bin/node`
53
+
-`/usr/bin/node`
54
+
- Windows `Program Files` Node.js install paths when relevant
55
+
- If needed, inspect environment variables and the active `PATH` to find a usable `node` binary.
56
+
- Do not proceed with project scripts unless Node 22+ has been confirmed.
28
57
29
58
## Documentation
30
59
@@ -36,4 +65,4 @@ Great usage examples can be found in the following folders in the `examples` fol
36
65
-`examples/with-tailwind/scripts`
37
66
-`examples/with-unocss/scripts`
38
67
39
-
When creating documentation please use the root `docs` folder. Do not add documentation in the `reactus` folder.
68
+
When creating documentation please use the root `docs` folder. Do not add documentation in the `reactus` folder.
0 commit comments