Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(set-env.js): replace fs.globSync with glob.sync #342

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

Himess
Copy link

@Himess Himess commented Jan 13, 2025

Problem

The set-env.js script uses fs.globSync, which does not exist in the fs module, causing a TypeError when executed.

Solution

  1. Replaced fs.globSync with glob.sync from the glob module.
  2. Added a note that the glob module must be installed as a dependency using: ```bash npm install glob

Changes Made
-Updated the script to use glob.sync.
-Included the necessary glob module import.

Issue Reference
Resolves #341
Resolves the issue: fs.globSync is not a function in set-env.js script

Test Results
The script was tested after the changes, and it worked as expected without throwing any errors. Below is the output from running the script:

Node.js v20.11.1
Copying files development
image

### Problem
The `set-env.js` script uses `fs.globSync`, which does not exist in the `fs` module, causing a `TypeError` when executed.

### Solution
1. Replaced `fs.globSync` with `glob.sync` from the `glob` module.
2. Added a note that the `glob` module must be installed as a dependency using:
   ```bash
   npm install glob

Signed-off-by: Himess <[email protected]>
Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v2-honey ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 1:32am

Copy link

vercel bot commented Jan 13, 2025

@Himess is attempting to deploy a commit to the Berachain Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fs.globSync is not a function in set-env.js script
1 participant