Fix: compile-ajv-validator's directory issue #7889
Open
+6
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Error while running the command "yarn":-
@uniswap/interface:ajv: node:internal/fs/utils:356
@uniswap/interface:ajv: throw err;
@uniswap/interface:ajv: ^
@uniswap/interface:ajv:
@uniswap/interface:ajv: Error: ENOENT: no such file or directory, open '/------/interface/apps/web/src/utils/generated/validateTokenList.js'
@uniswap/interface:ajv: at Object.openSync (node:fs:596:3)
@uniswap/interface:ajv: at Object.writeFileSync (node:fs:2322:35)
@uniswap/interface:ajv: at Object. (/------/interface/apps/web/scripts/compile-ajv-validators.js:14:4)
@uniswap/interface:ajv: at Module._compile (node:internal/modules/cjs/loader:1364:14)
@uniswap/interface:ajv: at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
@uniswap/interface:ajv: at Module.load (node:internal/modules/cjs/loader:1203:32)
@uniswap/interface:ajv: at Module._load (node:internal/modules/cjs/loader:1019:12)
@uniswap/interface:ajv: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
@uniswap/interface:ajv: at node:internal/main/run_main_module:28:49 {
@uniswap/interface:ajv: errno: -2,
@uniswap/interface:ajv: syscall: 'open',
@uniswap/interface:ajv: code: 'ENOENT',
@uniswap/interface:ajv: path: '/-------/interface/apps/web/src/utils/generated/validateTokenList.js'
Fix:-
auto created and ensured the directory exists before joining the path