2

当我尝试将故事书添加到现有的 Nrwl Nx monorepo 角度应用程序时出现以下错误。

我使用的命令是nx g @nrwl/angular:storybook-configuration <project name>

internal/modules/cjs/loader.js:983
  throw err;
  ^

Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands'
Require stack:
- /Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/lib/init-local.js
- /Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/bin/nx.js
- /usr/local/lib/node_modules/@nrwl/cli/lib/init-global.js
- /usr/local/lib/node_modules/@nrwl/cli/bin/nx.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
Shawns-MBP:ktp-web shawntony$ nx g @nrwl/angular:storybook-configuration modules-qbuilder
internal/modules/cjs/loader.js:983
  throw err;
  ^

Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands'
Require stack:
- /Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/lib/init-local.js
- /Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/bin/nx.js
- /usr/local/lib/node_modules/@nrwl/cli/lib/init-global.js
- /usr/local/lib/node_modules/@nrwl/cli/bin/nx.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.initLocal (/Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/lib/init-local.js:12:33)
    at Object.<anonymous> (/Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/bin/nx.js:12:18)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/lib/init-local.js',
    '/Users/shawntony/projects/ktp-web/node_modules/@nrwl/cli/bin/nx.js',
    '/usr/local/lib/node_modules/@nrwl/cli/lib/init-global.js',
    '/usr/local/lib/node_modules/@nrwl/cli/bin/nx.js'
  ]
}

4

0 回答 0