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

Path contains invalid characters #1098

Closed
s1mrankaur opened this issue Jan 10, 2024 · 3 comments
Closed

Path contains invalid characters #1098

s1mrankaur opened this issue Jan 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@s1mrankaur
Copy link

When I run
npm run generate,

I get:

C:\Users\AU\Downloads\backend\backend-catalog\node_modules\fs-extra\lib\mkdirs\utils.js:18
      const error = new Error(`Path contains invalid characters: ${pth}`)
                    ^
Error: Path contains invalid characters: C:\Users\AU\Downloads\backend\backend-catalog\domains\Sites\events\<anonymous-schema-1>
    at checkPath (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\fs-extra\lib\mkdirs\utils.js:18:21)
    at Object.module.exports.makeDirSync (C:\Users\SAU\Downloads\backend\backend-catalog\node_modules\fs-extra\lib\mkdirs\make-dir.js:21:3)  
    at C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\utils\lib\events.js:126:24
    at C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\plugin-doc-generator-asyncapi\lib\index.js:102:15
    at Array.map (<anonymous>)
    at parseAsyncAPIFile (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\plugin-doc-generator-asyncapi\lib\index.js:100:31)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async exports.default (C:\Users\AU\Downloads\backend\vbackend-catalog\node_modules\@eventcatalog\plugin-doc-generator-asyncapi\lib\index.js:132:18)
    at async Promise.all (index 0) {
  code: 'EINVAL'
}
Error: Command failed: cross-env PROJECT_DIR='C:\Users\AU\Downloads\backend\backend-catalog' npm run generate
    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at Command.<anonymous> (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\core\bin\eventcatalog.js:111:5)        
    at Command.listener [as _actionHandler] (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\commander\index.js:922:31)
    at Command._parseCommand (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\commander\index.js:1503:14)
    at Command._dispatchSubcommand (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\commander\index.js:1443:18)
    at Command._parseCommand (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\commander\index.js:1460:12)
    at Command.parse (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\commander\index.js:1292:10)
    at run (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\core\bin\eventcatalog.js:118:7)
    at Object.<anonymous> (C:\Users\AU\Downloads\backend\backend-catalog\node_modules\@eventcatalog\core\bin\eventcatalog.js:125:1) {       
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 5400,
  stdout: null,
  stderr: null
}
`

I tried to add a console log to fs-extra library and I see:

Generating EventCatalog docs using: @eventcatalog/plugin-doc-generator-asyncapi path is C:\Users\AU\Downloads\backend\backend-catalog\domains\Sites pathHasInvalidWinCharacters false path is C:\Users\AU\Downloads\backend\backend-catalog\domains\Sites\services\Site Service Events pathHasInvalidWinCharacters false path is C:\Users\AU\Downloads\backend\backend-catalog\domains\Sites\events\<anonymous-schema-1> pathHasInvalidWinCharacters true path is C:\Users\AU\Downloads\backend\backend-catalog\domains\Sites\events\<anonymous-schema-8> pathHasInvalidWinCharacters true

So, basically it's < and > characters that are problemtic but those paths seem to be generated by the plugin itself.

@s1mrankaur s1mrankaur added the bug Something isn't working label Jan 10, 2024
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Jan 17, 2024

hey there
sorry but we need more details, there is no such npm script in generator repo as npm run generate

please share exactly what are you doing, the command to run generation and best - share your asyncapi document

otherwise we cannot do much

@derberg
Copy link
Member

derberg commented Mar 11, 2024

no more details provided, closing

@derberg derberg closed this as completed Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants