命令npx @nestjs/cli g mo hhhhfdsgjkj
对于新项目,它工作正常,但是当我尝试为现有项目生成模块时,出现此错误
at MetadataManager.insert (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/@nestjs/schematics/utils/metadata.manager.js:12:41)
at ModuleMetadataDeclarator.declare (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/@nestjs/schematics/utils/module-metadata.declarator.js:7:34)
at ModuleDeclarator.declare (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/@nestjs/schematics/utils/module.declarator.js:14:33)
at /Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/@nestjs/schematics/lib/module/module.factory.js:53:51
at MergeMapSubscriber.pipe.operators_1.mergeMap.inputTree [as project] (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/@angular-devkit/schematics/src/rules/call.js:74:24)
at MergeMapSubscriber._tryNext (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/rxjs/internal/operators/mergeMap.js:69:27)
at MergeMapSubscriber._next (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
at MergeMapSubscriber.Subscriber.next (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/rxjs/internal/Subscriber.js:66:18)
at MergeMapSubscriber.notifyNext (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/rxjs/internal/operators/mergeMap.js:92:26)
at InnerSubscriber._next (/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/rxjs/internal/InnerSubscriber.js:28:21)
Failed to execute command: "/Users/ttt/.npm/_npx/81751/lib/node_modules/@nestjs/cli/node_modules/.bin/schematics" @nestjs/schematics:module --name=hhhhfdsgjkj --no-dry-run --spec --collection="@nestjs/schematics" --language="ts" --sourceRoot="src"```