我是Nx工作区和monorepos的新手,希望了解更多信息。
我在ng add @nrwl/angular
内创建了一个称为服务的工作区,然后生成了一个名为frontend-default的应用程序,当我尝试运行nx serve frontend-default
时出现以下错误
[error] Error: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- node_modules/@angular-devkit/architect/node/index.js
- node_modules/@angular/cli/models/architect-command.js
- node_modules/@angular/cli/commands/run-impl.js
- node_modules/@angular-devkit/schematics/tools/export-ref.js
- node_modules/@angular-devkit/schematics/tools/index.js
- node_modules/@angular/cli/utilities/json-schema.js
- node_modules/@angular/cli/models/command-runner.js
- node_modules/@angular/cli/lib/cli/index.js
- node_modules/@angular/cli/lib/init.js
- node_modules/@nrwl/cli/lib/run-cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
at Function.resolve (internal/modules/cjs/helpers.js:79:19)
at WorkspaceNodeModulesArchitectHost.resolveBuilder (node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:41:41)
at RunCommand.runSingleTarget (node_modules/@angular/cli/models/architect-command.js:175:55)
at async RunCommand.runArchitectTarget (node_modules/@angular/cli/models/architect-command.js:217:24)
我在做什么错?我应该运行npm update or npm install
吗?