nestjs / docs.nestjs.com

The official documentation https://docs.nestjs.com 📕
MIT License
1.2k stars 1.74k forks source link

Error running processor cleanGeneratedFiles #2611

Closed MR-Mostafa closed 1 year ago

MR-Mostafa commented 1 year ago

I'm submitting a...

Current behavior

Documentation error when run npm run start

Expected behavior

when we run npm run start command, The following error is displayed The same error also occurred when using yarn.

> nestjs-docs@1.0.0 docs-only
> ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nestjs-package/index

info:    running processor: readFilesProcessor
info:    running processor: extractJSDocCommentsProcessor
info:    running processor: parseTagsProcessor
info:    running processor: extractTagsProcessor
info:    running processor: codeNameProcessor
info:    running processor: computeIdsProcessor
info:    running processor: computeWhoUsesProcessor
info:    running processor: computePathsProcessor
info:    running processor: renderDocsProcessor
info:    running processor: unescapeCommentsProcessor
info:    running processor: inlineTagProcessor
info:    running processor: postProcessHtml
info:    running processor: extractContentTitleProcessor
info:    running processor: convertToJsonProcessor
info:    running processor: computeOutputPathProcessor
info:    running processor: cleanGeneratedFiles
error:   Error running processor "cleanGeneratedFiles":
Illegal characters in path.
error:   Failed to process the docs
Error: Error running processor "cleanGeneratedFiles":
Illegal characters in path.
    at pathArg (C:\...\nestjs\docs\node_modules\rimraf\src\path-arg.ts:48:27)
    at AsyncFunction.<anonymous> (C:\...\nestjs\docs\node_modules\rimraf\src\index.ts:56:19)
    at CleanGeneratedFiles.$process (C:\...\nestjs\docs\tools\transforms\nestjs-package\processors\cleanGeneratedFiles.ts:12:12)
    at C:\...\nestjs\docs\node_modules\dgeni\src\Dgeni.ts:207:31 {
  path: 'C:\\...\\nestjs\\docs\\src\\app\\homepage\\pages\\{docs,*.json}',
  code: 'EINVAL'
}

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment

For Tooling issues:

Others:

Tony133 commented 1 year ago

If I understand this command correctly, does npm run docs not work for you?

On unix system it works perfectly, with npm run docs:

➜ npm run docs                                

> nestjs-docs@1.0.0 docs
> npm run docs-only

> nestjs-docs@1.0.0 docs-only
> ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nestjs-package/index

info:    running processor: readFilesProcessor
info:    running processor: extractJSDocCommentsProcessor
info:    running processor: parseTagsProcessor
info:    running processor: extractTagsProcessor
info:    running processor: codeNameProcessor
info:    running processor: computeIdsProcessor
info:    running processor: computeWhoUsesProcessor
info:    running processor: computePathsProcessor
info:    running processor: renderDocsProcessor
info:    running processor: unescapeCommentsProcessor
info:    running processor: inlineTagProcessor
info:    running processor: postProcessHtml
info:    running processor: extractContentTitleProcessor
info:    running processor: convertToJsonProcessor
info:    running processor: computeOutputPathProcessor
info:    running processor: cleanGeneratedFiles
info:    running processor: writeFilesProcessor
info:    running processor: checkAnchorLinksProcessor
warn:    Dangling links: 66 unmatched links. The following docs have links to URLs that do not exist
       - doc "cli/usages" (content)  - from file "cli/usages.md"
         - cli/monorepo#assets
       - doc "cli/workspaces" (content)  - from file "cli/workspaces.md"
         - /cli/monorepo#cli-properties
         - cli/monorepo#assets
       - doc "custom-decorators" (content)  - from file "custom-decorators.md"
         - techniques/authentication#implementing-passport-strategies
       - doc "faq/errors" (content)  - from file "faq/errors.md"
         - /fundamentals/custom-providers#di-fundamentals
         - /faq/common-errors#circular-dependency-error
       - doc "faq/serverless" (content)  - from file "faq/serverless.md"
         - /cli/monorepo#monorepo-mode
       - doc "fundamentals/dependency-injection" (content)  - from file "fundamentals/dependency-injection.md"
         - /fundamentals/custom-providers#standard-providers
         - /fundamentals/custom-providers#di-fundamentals
       - doc "fundamentals/lifecycle-events" (content)  - from file "fundamentals/lifecycle-events.md"
         - fundamentals/lifecycle-events#application-shutdown
       - doc "fundamentals/provider-scopes" (content)  - from file "fundamentals/provider-scopes.md"
         - /fundamentals/module-ref#resolving-scoped-providers
       - doc "fundamentals/unit-testing" (content)  - from file "fundamentals/unit-testing.md"
         - /fundamentals/module-ref
         - /fundamentals/module-ref
       - doc "graphql/field-middleware" (content)  - from file "graphql/field-middleware.md"
         - /graphql/other-features#execute-enhancers-at-the-field-resolver-level
       - doc "graphql/quick-start" (content)  - from file "graphql/quick-start.md"
         - /graphql/other-features#creating-a-custom-driver
       - doc "graphql/resolvers-map" (content)  - from file "graphql/resolvers-map.md"
         - /graphql/resolvers#module
       - doc "microservices/grpc" (content)  - from file "microservices/grpc.md"
         - microservices/grpc#options
         - microservices/basics#request-response
         - microservices/grpc#options
         - microservices/grpc#subject-strategy
         - microservices/grpc#call-stream-handler
       - doc "middlewares" (content)  - from file "middlewares.md"
         - /middleware#multiple-middleware
         - middleware#functional-middleware
       - doc "recipes/prisma" (content)  - from file "recipes/prisma.md"
         - recipes/prisma#issues-with-enableshutdownhooks
       - doc "recipes/sql-sequelize" (content)  - from file "recipes/sql-sequelize.md"
         - /techniques/database#sequelize-integration
       - doc "recipes/terminus" (content)  - from file "recipes/terminus.md"
         - fundamentals/lifecycle-events#application-shutdown
         - techniques/database#multiple-databases
       - doc "security/authentication" (content)  - from file "security/authentication.md"
         - exception-filters
         - guards
         - /fundamentals/module-ref#getting-current-sub-tree
       - doc "techniques/configuration" (content)  - from file "techniques/configuration.md"
         - techniques/configuration#getting-started
         - /cli/monorepo#assets
         - techniques/configuration#custom-configuration-files
         - techniques/configuration#custom-configuration-files
         - techniques/configuration#getting-started
       - doc "techniques/cookies" (content)  - from file "techniques/cookies.md"
         - /controllers#appendix-library-specific-approach
         - /controllers#appendix-library-specific-approach
       - doc "techniques/logger" (content)  - from file "techniques/logger.md"
         - techniques/logger#dependency-injection
         - techniques/logger#using-the-logger-for-application-logging
         - techniques/logger#custom-logger-implementation
         - techniques/logger#dependency-injection
         - techniques/logger#using-the-logger-for-application-logging
         - techniques/logger#injecting-a-custom-logger
       - doc "techniques/queues" (content)  - from file "techniques/queues.md"
         - techniques/queues#producers
         - techniques/queues#consumers
         - techniques/queues#event-listeners
         - techniques/queues#consumers
         - techniques/queues#consumers
         - techniques/queues#consumers
         - /fundamentals/injection-scopes#provider-scope
         - techniques/queues#consumers
       - doc "techniques/sql" (content)  - from file "techniques/sql.md"
         - /techniques/database#sequelize-integration
       - doc "techniques/task-scheduling" (content)  - from file "techniques/task-scheduling.md"
         - techniques/task-scheduling#declarative-cron-jobs
         - techniques/task-scheduling#declarative-timeouts
         - techniques/task-scheduling#declarative-intervals
         - techniques/task-scheduling#dynamic-intervals
         - techniques/task-scheduling#dynamic-timeouts
         - techniques/task-scheduling#declarative-cron-jobs
         - techniques/task-scheduling#declarative-timeouts
         - techniques/task-scheduling#declarative-intervals
         - techniques/task-scheduling#declarative-cron-jobs
       - doc "techniques/versioning" (content)  - from file "techniques/versioning.md"
         - techniques/versioning#uri-versioning-type
         - techniques/versioning#header-versioning-type
         - techniques/versioning#media-type-versioning-type
         - techniques/versioning#custom-versioning-type
         - faq/global-prefix
127 docs generated.

docs.nestjs.com on  master via  v18.12.1 took 3s 
➜ 

and npm run start:

docs.nestjs.com on  master via  v18.12.1 
❯ npm run start    

> nestjs-docs@1.0.0 prestart
> npm run docs

> nestjs-docs@1.0.0 docs
> npm run docs-only

> nestjs-docs@1.0.0 docs-only
> ts-node -P tools/tsconfig.json tools/dgeni-cli.ts tools/transforms/nestjs-package/index

info:    running processor: readFilesProcessor
info:    running processor: extractJSDocCommentsProcessor
info:    running processor: parseTagsProcessor
info:    running processor: extractTagsProcessor
info:    running processor: codeNameProcessor
info:    running processor: computeIdsProcessor
info:    running processor: computeWhoUsesProcessor
info:    running processor: computePathsProcessor
info:    running processor: renderDocsProcessor
info:    running processor: unescapeCommentsProcessor
info:    running processor: inlineTagProcessor
info:    running processor: postProcessHtml
info:    running processor: extractContentTitleProcessor
info:    running processor: convertToJsonProcessor
info:    running processor: computeOutputPathProcessor
info:    running processor: cleanGeneratedFiles
info:    running processor: writeFilesProcessor
info:    running processor: checkAnchorLinksProcessor
warn:    Dangling links: 66 unmatched links. The following docs have links to URLs that do not exist
       - doc "cli/usages" (content)  - from file "cli/usages.md"
         - cli/monorepo#assets
       - doc "cli/workspaces" (content)  - from file "cli/workspaces.md"
         - /cli/monorepo#cli-properties
         - cli/monorepo#assets
       - doc "custom-decorators" (content)  - from file "custom-decorators.md"
         - techniques/authentication#implementing-passport-strategies
       - doc "faq/errors" (content)  - from file "faq/errors.md"
         - /fundamentals/custom-providers#di-fundamentals
         - /faq/common-errors#circular-dependency-error
       - doc "faq/serverless" (content)  - from file "faq/serverless.md"
         - /cli/monorepo#monorepo-mode
       - doc "fundamentals/dependency-injection" (content)  - from file "fundamentals/dependency-injection.md"
         - /fundamentals/custom-providers#standard-providers
         - /fundamentals/custom-providers#di-fundamentals
       - doc "fundamentals/lifecycle-events" (content)  - from file "fundamentals/lifecycle-events.md"
         - fundamentals/lifecycle-events#application-shutdown
       - doc "fundamentals/provider-scopes" (content)  - from file "fundamentals/provider-scopes.md"
         - /fundamentals/module-ref#resolving-scoped-providers
       - doc "fundamentals/unit-testing" (content)  - from file "fundamentals/unit-testing.md"
         - /fundamentals/module-ref
         - /fundamentals/module-ref
       - doc "graphql/field-middleware" (content)  - from file "graphql/field-middleware.md"
         - /graphql/other-features#execute-enhancers-at-the-field-resolver-level
       - doc "graphql/quick-start" (content)  - from file "graphql/quick-start.md"
         - /graphql/other-features#creating-a-custom-driver
       - doc "graphql/resolvers-map" (content)  - from file "graphql/resolvers-map.md"
         - /graphql/resolvers#module
       - doc "microservices/grpc" (content)  - from file "microservices/grpc.md"
         - microservices/grpc#options
         - microservices/basics#request-response
         - microservices/grpc#options
         - microservices/grpc#subject-strategy
         - microservices/grpc#call-stream-handler
       - doc "middlewares" (content)  - from file "middlewares.md"
         - /middleware#multiple-middleware
         - middleware#functional-middleware
       - doc "recipes/prisma" (content)  - from file "recipes/prisma.md"
         - recipes/prisma#issues-with-enableshutdownhooks
       - doc "recipes/sql-sequelize" (content)  - from file "recipes/sql-sequelize.md"
         - /techniques/database#sequelize-integration
       - doc "recipes/terminus" (content)  - from file "recipes/terminus.md"
         - fundamentals/lifecycle-events#application-shutdown
         - techniques/database#multiple-databases
       - doc "security/authentication" (content)  - from file "security/authentication.md"
         - exception-filters
         - guards
         - /fundamentals/module-ref#getting-current-sub-tree
       - doc "techniques/configuration" (content)  - from file "techniques/configuration.md"
         - techniques/configuration#getting-started
         - /cli/monorepo#assets
         - techniques/configuration#custom-configuration-files
         - techniques/configuration#custom-configuration-files
         - techniques/configuration#getting-started
       - doc "techniques/cookies" (content)  - from file "techniques/cookies.md"
         - /controllers#appendix-library-specific-approach
         - /controllers#appendix-library-specific-approach
       - doc "techniques/logger" (content)  - from file "techniques/logger.md"
         - techniques/logger#dependency-injection
         - techniques/logger#using-the-logger-for-application-logging
         - techniques/logger#custom-logger-implementation
         - techniques/logger#dependency-injection
         - techniques/logger#using-the-logger-for-application-logging
         - techniques/logger#injecting-a-custom-logger
       - doc "techniques/queues" (content)  - from file "techniques/queues.md"
         - techniques/queues#producers
         - techniques/queues#consumers
         - techniques/queues#event-listeners
         - techniques/queues#consumers
         - techniques/queues#consumers
         - techniques/queues#consumers
         - /fundamentals/injection-scopes#provider-scope
         - techniques/queues#consumers
       - doc "techniques/sql" (content)  - from file "techniques/sql.md"
         - /techniques/database#sequelize-integration
       - doc "techniques/task-scheduling" (content)  - from file "techniques/task-scheduling.md"
         - techniques/task-scheduling#declarative-cron-jobs
         - techniques/task-scheduling#declarative-timeouts
         - techniques/task-scheduling#declarative-intervals
         - techniques/task-scheduling#dynamic-intervals
         - techniques/task-scheduling#dynamic-timeouts
         - techniques/task-scheduling#declarative-cron-jobs
         - techniques/task-scheduling#declarative-timeouts
         - techniques/task-scheduling#declarative-intervals
         - techniques/task-scheduling#declarative-cron-jobs
       - doc "techniques/versioning" (content)  - from file "techniques/versioning.md"
         - techniques/versioning#uri-versioning-type
         - techniques/versioning#header-versioning-type
         - techniques/versioning#media-type-versioning-type
         - techniques/versioning#custom-versioning-type
         - faq/global-prefix
127 docs generated.

> nestjs-docs@1.0.0 start
> ng serve

****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION!
****************************************************************************************
One or more browsers which are configured in the project's Browserslist configuration will be ignored as ES5 output is not supported by the Angular CLI.
Ignored browsers: kaios 2.5, op_mini all
✔ Browser application bundle generation complete.

Initial Chunk Files   | Names                                             |  Raw Size | Estimated Transfer Size
main.js               | main                                              | 854.13 kB |               197.95 kB
styles.css, styles.js | styles                                            | 240.98 kB |                41.12 kB
polyfills.js          | polyfills                                         | 214.93 kB |                58.96 kB
runtime.js            | runtime                                           |   2.74 kB |                 1.29 kB

                      | Initial Total                                     |   1.28 MB |               299.32 kB

Lazy Chunk Files      | Names                                             |  Raw Size | Estimated Transfer Size
556.js                | homepage-pages-techniques-techniques-module       | 403.80 kB |                73.46 kB
418.js                | homepage-pages-graphql-graphql-module             | 258.88 kB |                45.19 kB
882.js                | homepage-pages-fundamentals-fundamentals-module   | 194.59 kB |                38.34 kB
690.js                | homepage-pages-recipes-recipes-module             | 186.87 kB |                36.88 kB
790.js                | homepage-pages-microservices-microservices-module | 175.08 kB |                30.84 kB
197.js                | homepage-pages-security-security-module           | 130.26 kB |                26.85 kB
149.js                | homepage-pages-cli-cli-module                     |  84.85 kB |                17.83 kB
338.js                | homepage-pages-openapi-openapi-module             |  80.45 kB |                16.19 kB
597.js                | homepage-pages-faq-faq-module                     |  59.46 kB |                13.71 kB
177.js                | homepage-pages-websockets-websockets-module       |  39.13 kB |                 8.26 kB

Build at: 2023-02-05T15:44:32.875Z - Hash: 25a80067ab46c801 - Time: 28719ms

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

✔ Compiled successfully.
kamilmysliwiec commented 1 year ago

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.