## 事象
以下のようなbruファイルを書く。
```
script:pre-request {
const fs = require('fs');
}
```
[[Bruno]]で[[リクエスト (Bruno)|リクエスト]]を実行するとエラーになる。
```error
Pre-Request Script Error
Module '/fs' is not allowed to be required. The path is outside the border!
```
### 環境
| 対象 | バージョン |
| --------- | ---------- |
| [[macOS]] | 15.5 |
| [[Bruno]] | 2.4.0 |
## 原因
デフォルトではファイルシステムへのアクセスは認められていないから。
## 解決方法
`bruno.json` の `scripts.filesystemAccess.allow` に `true` を設定する。
```json
{
"scripts": {
"filesystemAccess": {
"allow": true
}
}
}
```
## 参考
- [Bruno - The Open Source API Client](https://docs.usebruno.com/testing/script/whitelisting-modules)