readmeio / readmeio/cli

Fatal error on sync

Open
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
0
Avg merge
2d 11h
Merged PRs (30d)
4

Description

Error: ENOENT: no such file or directory, open '/builds/x.md'                                                                         
    at Object.writeFileSync (node:fs:2380:20)                                                                    
    at syncOneOas                                                                                                
(file:///root/.npm/_npx/27f4e0732de9f562/node_modules/@readme/cli/src/commands/oas-sync.js:235:10)               
    at syncOas (file:///root/.npm/_npx/27f4e0732de9f562/node_modules/@readme/cli/src/commands/oas-sync.js:303:21)
    at Module.run                                                                                                
(file:///root/.npm/_npx/27f4e0732de9f562/node_modules/@readme/cli/src/commands/oas-sync.js:319:19)               
    at Command.<anonymous> (file:///root/.npm/_npx/27f4e0732de9f562/node_modules/@readme/cli/src/cli.js:100:19)  
    at async Command.parseAsync (/root/.npm/_npx/27f4e0732de9f562/node_modules/commander/lib/command.js:1104:5)  
    at async main (file:///root/.npm/_npx/27f4e0732de9f562/node_modules/@readme/cli/src/cli.js:193:3) {          
  errno: -2,                                                                                                     
  code: 'ENOENT',                                                                                                
  syscall: 'open',                                                                                               
  path: '/builds/x.md'      
}                                                                                                                

May have something to do with slashes in a spec's operation ids, but I can't say for sure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sync failure with an OpenAPI spec whose operation IDs contain slashes. Start in oas-sync.js at syncOneOas around line 235, then follow its caller syncOas around line 303; done means sync no longer fails with ENOENT when writing the generated path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.