Skip to content

Commit eaa53db

Browse files
committed
feat: add note about NODE_OPTIONS
1 parent 453c36b commit eaa53db

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

development-workflow.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,29 @@ You can customize the `ns run` command using any of the following options:
102102
- `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds.
103103
- `--clean` - If set forces rebuilding the native application.
104104

105+
::: tip Note
106+
If you see this output in the terminal:
107+
108+
```
109+
Webpack compilation complete. Watching for file changes.
110+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH'
111+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH'
112+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH' <-- This repeats many times
113+
```
114+
115+
This is related to node configuration options on your machine.
116+
117+
**Solution**:
118+
119+
Try adding this to your `~/.bash_profile` if you have one or `~/.zshenv` if using Zsh:
120+
121+
```
122+
export NODE_OPTIONS="--max-old-space-size=6096"
123+
```
124+
125+
Then open a new terminal window and run your app.
126+
:::
127+
105128
### `debug`
106129

107130
The `debug` command builds and deploys a new package on a connected device or emulator. By default, it also starts to track for changes the `app` folder, meaning that it will automatically livesync changes in code as soon as they are saved. In order to apply the changes, the CLI will automatically restart the application after each sync.

troubleshooting.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ Command failed: ruby -e "require 'xcodeproj'; Xcodeproj::Config.new('/Users/nstu
3434

3535
**Common solution:** Open a new terminal window - and retry.
3636

37+
### EMFILE: too many open files 'FILE_PATH'
38+
39+
```
40+
Webpack compilation complete. Watching for file changes.
41+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH'
42+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH'
43+
Watchpack Error (watcher): Error: EMFILE: too many open files 'FILE_PATH' <-- This repeats many times
44+
```
45+
46+
**Solution**:
47+
48+
Try adding this to your `~/.bash_profile` if you have one or `~/.zshenv` if using Zsh:
49+
50+
```
51+
export NODE_OPTIONS="--max-old-space-size=6096"
52+
```
53+
54+
Then open a new terminal window and run your app.
55+
3756
## TypeScript related
3857

3958
```

0 commit comments

Comments
 (0)