If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
- Run
node run web after initial repo setup
Expected Result:
No error should display after user runs node run web after initial repo setup
Actual Result:
Running node run web after initial repo setup errors out if you haven't had the ./dist folder
Full error:
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, open '/Users/g/App/dist/version.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/g/App/dist/version.json'
}
Context
The issue is in config/webpack/CustomVersionFilePlugin.js where fs.writeFile fails if any of the file's parent directories don't exist. A solution is wrapping that call in a call to fs.mkdir with the recursive strategy to first create any of the file's parent directories if they don't yet exist (example here).
Note: I'm on Mac but from the history here, it seems this affects Windows and Linux too (I'd assume fs 's methods interact consistently with different OSes)
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.24-0
Reproducible in staging?: Y
Reproducible in production?:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @CSFlorin
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1640764185210000
View all open jobs on GitHub
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
node run webafter initial repo setupExpected Result:
No error should display after user runs
node run webafter initial repo setupActual Result:
Running node run web after initial repo setup errors out if you haven't had the ./dist folder
Full error:
Context
The issue is in config/webpack/CustomVersionFilePlugin.js where fs.writeFile fails if any of the file's parent directories don't exist. A solution is wrapping that call in a call to fs.mkdir with the recursive strategy to first create any of the file's parent directories if they don't yet exist (example here).
Note: I'm on Mac but from the history here, it seems this affects Windows and Linux too (I'd assume fs 's methods interact consistently with different OSes)
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.24-0
Reproducible in staging?: Y
Reproducible in production?:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Issue reported by: @CSFlorin
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1640764185210000
View all open jobs on GitHub