wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
758 stars 45 forks source link

Angular v14 + NX - Failed to load configuration file: Automatic Angular CLI configuration error #3038

Closed marleypowell closed 2 years ago

marleypowell commented 2 years ago

Issue description or question

After upgrading to angular v14 we have started seeing these errors which stop wallaby from working:

Failed to load configuration file: Automatic Angular CLI configuration error: Could not find a local workspace. Are you in a project?

Wallaby diagnostics report

{
  editorVersion: '1.69.2',
  pluginVersion: '1.0.345',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.19044',
  nodeVersion: 'v16.16.0',
  coreVersion: '1.0.1310',
  checksum: 'MjgyNzIxZGMyYWIxOTE1YjMyN2FlZWI1YTVlNGNkYzMsMTY5MDU4ODgwMDAwMCww',
  config: {},
  packageJSON: {
    dependencies: {
      '@angular-architects/module-federation': '14.3.9',
      '@angular/animations': '14.0.6',
      '@angular/cdk': '14.0.5',
      '@angular/common': '14.0.6',
      '@angular/compiler': '14.0.6',
      '@angular/core': '14.0.6',
      '@angular/forms': '14.0.6',
      '@angular/platform-browser': '14.0.6',
      '@angular/platform-browser-dynamic': '14.0.6',
      '@angular/router': '14.0.6',
      '@datadog/browser-rum': '4.15.0',
      '@exclaimer/common': '7.0.0-preview-20220728.9',
      '@exclaimer/types': '7.0.0-preview-20220728.9',
      '@exclaimer/ui': '7.0.0-preview-20220728.9',
      '@fortawesome/fontawesome-pro': '5.15.4',
      '@ngx-translate/core': '14.0.0',
      '@ngxs/form-plugin': '3.7.3',
      '@ngxs/store': '3.7.3',
      'angular-google-tag-manager': '1.5.0',
      'date-fns': '2.28.0',
      highcharts: '10.2.0',
      'highcharts-angular': '3.0.0',
      immer: '9.0.15',
      normalizr: '3.6.2',
      rxjs: '7.5.6',
      tslib: '2.4.0',
      'zone.js': '0.11.6'
    },
    devDependencies: {
      '@angular-devkit/build-angular': '14.0.6',
      '@angular-eslint/eslint-plugin': '13.5.0',
      '@angular-eslint/eslint-plugin-template': '13.5.0',
      '@angular-eslint/template-parser': '13.5.0',
      '@angular/cli': '14.0.6',
      '@angular/compiler-cli': '14.0.6',
      '@angular/language-service': '14.0.6',
      '@babel/core': '7.18.6',
      '@exclaimer/prettier-config': '2.2.1',
      '@exclaimer/tsconfig': '2.0.0',
      '@nrwl/angular': '14.4.3',
      '@nrwl/cli': '14.4.3',
      '@nrwl/devkit': '14.4.3',
      '@nrwl/eslint-plugin-nx': '14.4.3',
      '@nrwl/js': '14.4.3',
      '@nrwl/linter': '14.4.3',
      '@nrwl/nx-cloud': '14.2.0',
      '@nrwl/nx-plugin': '14.4.3',
      '@nrwl/storybook': '14.4.3',
      '@nrwl/tao': '14.4.3',
      '@nrwl/workspace': '14.4.3',
      '@nx-dotnet/core': '1.12.0',
      '@openapitools/openapi-generator-cli': '2.5.1',
      '@storybook/addon-a11y': '6.5.9',
      '@storybook/addon-essentials': '6.5.9',
      '@storybook/addon-interactions': '6.5.9',
      '@storybook/addon-storysource': '6.5.9',
      '@storybook/angular': '6.5.9',
      '@storybook/builder-webpack5': '6.5.9',
      '@storybook/core-server': '6.5.9',
      '@storybook/manager-webpack5': '6.5.9',
      '@storybook/testing-library': '0.0.13',
      '@swc-node/register': '1.4.2',
      '@swc/core': '1.2.173',
      '@trumbitta/nx-plugin-openapi': '1.11.0',
      '@types/jasmine': '4.0.3',
      '@types/node': '16.11.41',
      '@typescript-eslint/eslint-plugin': '5.30.0',
      '@typescript-eslint/parser': '5.30.0',
      concurrently: '7.2.2',
      eslint: '8.18.0',
      'eslint-config-prettier': '8.5.0',
      'jasmine-core': '4.2.0',
      'jasmine-spec-reporter': '7.0.0',
      karma: '6.4.0',
      'karma-chrome-launcher': '3.1.1',
      'karma-coverage-istanbul-reporter': '3.0.3',
      'karma-jasmine': '5.1.0',
      'karma-jasmine-html-reporter': '2.0.0',
      'karma-junit-reporter': '2.0.1',
      'ng-mocks': '14.1.0',
      'ng-packagr': '14.0.3',
      postcss: '8.4.14',
      'postcss-import': '14.1.0',
      'postcss-preset-env': '7.7.2',
      'postcss-url': '10.1.3',
      prettier: '2.7.1',
      'storybook-addon-designs': '6.3.1',
      typescript: '4.7.4',
      'vsts-npm-auth': '0.42.1'
    }
  },
  fs: { numberOfFiles: 0 },
  debug: [
    '2022-08-03T07:01:59.220Z config Attempting automatic configuration for angular\n',
    '2022-08-03T07:01:59.301Z angular/cli config Detected Angular CLI.\n',
    '2022-08-03T07:01:59.304Z angular/cli config Angular currentDirPath: "C:\\repos\\excl\\exclaimercloud-ui", workspaceDirPath: "C:\\repos\\excl\\exclaimercloud-ui"\n',
    '2022-08-03T07:02:00.444Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/apps/cloud-ui/frontend/src/test.ts.\n',
    '2022-08-03T07:02:00.445Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/cloud-ui/i18n/src/test.ts.\n',
    '2022-08-03T07:02:00.446Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/cloud-ui/ui/src/test.ts.\n',
    '2022-08-03T07:02:00.447Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/configuration/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.448Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/configuration/feature-mail-flow/src/test.ts.\n',
    '2022-08-03T07:02:00.448Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/configuration/feature-onboarding/src/test.ts.\n',
    '2022-08-03T07:02:00.449Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/configuration/feature-outlook-signatures/src/test.ts.\n',
    '2022-08-03T07:02:00.449Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/configuration/feature-user-data/src/test.ts.\n',
    '2022-08-03T07:02:00.449Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/diagnostic-logs/shell/src/test.ts.\n',
    '2022-08-03T07:02:00.450Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/shared/common/src/test.ts.\n',
    '2022-08-03T07:02:00.450Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/shared/data-access-user/src/test.ts.\n',
    '2022-08-03T07:02:00.450Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/common/src/test.ts.\n',
    '2022-08-03T07:02:00.451Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/customer-experience/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.451Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/customer-experience/main/src/test.ts.\n',
    '2022-08-03T07:02:00.451Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/customer-experience/types/src/test.ts.\n',
    '2022-08-03T07:02:00.452Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/customer-experience/ui/src/test.ts.\n',
    '2022-08-03T07:02:00.452Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.452Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/engagement/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.453Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/engagement/main/src/test.ts.\n',
    '2022-08-03T07:02:00.453Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/apps/signature-analytics/frontend/src/test.ts.\n',
    '2022-08-03T07:02:00.453Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/i18n/src/test.ts.\n',
    '2022-08-03T07:02:00.453Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/types/src/test.ts.\n',
    '2022-08-03T07:02:00.454Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/ui/src/test.ts.\n',
    '2022-08-03T07:02:00.454Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/usage/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.454Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-analytics/usage/main/src/test.ts.\n',
    '2022-08-03T07:02:00.454Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-designer/shell/src/test.ts.\n',
    '2022-08-03T07:02:00.454Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signature-tester/shell/src/test.ts.\n',
    '2022-08-03T07:02:00.455Z angular/cli karma workspace config Using virtual C:/repos/excl/exclaimercloud-ui/libs/signatures/data-access/src/test.ts.\n',
    '2022-08-03T07:02:00.455Z angular/cli karma workspace config Using virtual C:\\repos\\excl\\exclaimercloud-ui\\tsconfig.wallaby.spec.json.\n',
    '2022-08-03T07:02:00.479Z angular/cli config Error: Could not find a local workspace. Are you in a project?\n' +
      '    at promptAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\analytics\\analytics.js:118:15)\n' +
      '    at async createAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\analytics\\analytics.js:259:17)\n' +
      '    at async TestCommandModule.reportAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\command-module.js:136:27)\n' +
      '    at async TestCommandModule.runSingleTarget (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\architect-base-command-module.js:37:9)\n' +
      '    at async TestCommandModule.run (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\architect-command-module.js:73:20)\n',
    '2022-08-03T07:02:00.483Z angular/cli config Angular.json: \n' +
      ' {\n' +
      '  version: 1,\n' +
      '  projects: {\n' +
      "    'cloud-ui-backend': {\n" +
      "      root: 'apps/cloud-ui/backend/ExclaimerCloud.UI',\n" +
      "      projectType: 'application',\n" +
      "      sourceRoot: 'apps/cloud-ui/backend/ExclaimerCloud.UI',\n" +
      '      architect: {\n' +
      "        'build-backend': {\n" +
      "          builder: '@nx-dotnet/core:build',\n" +
      "          outputs: [ 'dist/apps/cloud-ui/backend', 'apps/cloud-ui/backend/ExclaimerCloud.UI/obj' ],\n" +
      "          options: { configuration: 'Debug', noDependencies: false, noIncremental: true },\n" +
      "          configurations: { production: { configuration: 'Release' } }\n" +
      '        },\n' +
      "        serve: { builder: '@nx-dotnet/core:serve', options: { configuration: 'Debug' }, configurations: { production: { configuration: 'Release' } } },\n" +
      "        lint: { builder: '@nx-dotnet/core:format', options: { verbosity: 'diagnostic', check: false } },\n" +
      "        'generate-api-schema': {\n" +
      "          builder: '@nrwl/workspace:run-commands',\n" +
      '          options: {\n' +
      '            commands: [\n' +
      "              'nx run cloud-ui-backend:build-backend',\n" +
      "              'dotnet swagger tofile --yaml --output libs/shared/api-client-cloud-ui/schema.yml dist/apps/cloud-ui/backend/net6.0/ExclaimerCloud.UI.dll v1',\n" +
      "              'npx prettier --write libs/shared/api-client-cloud-ui/schema.yml'\n" +
      '            ],\n' +
      '            parallel: false\n' +
      '          }\n' +
      '        }\n' +
      '      },\n' +
      "      tags: [ 'nx-dotnet' ]\n" +
      '    },\n' +
      "    'cloud-ui-backend-tests': {\n" +
      "      root: 'apps/cloud-ui/backend/ExclaimerCloud.UI.Tests',\n" +
      "      projectType: 'application',\n" +
      "      sourceRoot: 'apps/cloud-ui/backend/ExclaimerCloud.UI.Tests',\n" +
      '      architect: {\n' +
      "        'build-backend': {\n" +
      "          builder: '@nx-dotnet/core:build',\n" +
      "          outputs: [ 'dist/apps/cloud-ui/backend/ExclaimerCloud.UI.Tests' ],\n" +
      "          options: { configuration: 'Debug', noDependencies: false, noIncremental: true },\n" +
      "          configurations: { production: { configuration: 'Release' } }\n" +
      '        },\n' +
      '        test: {\n' +
      "          builder: '@nrwl/workspace:run-commands',\n" +
      "          dependsOn: [ { target: 'build-backend', projects: 'self' } ],\n" +
      '          options: {\n' +
      `            command: 'dotnet test apps/cloud-ui/backend/ExclaimerCloud.UI.Tests/ExclaimerCloud.UI.Tests.csproj -c Debug --logger "trx;LogFilePrefix=Results" --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --no-build'\n` +
      '          },\n' +
      '          configurations: {\n' +
      '            production: {\n' +
      `              command: 'dotnet test apps/cloud-ui/backend/ExclaimerCloud.UI.Tests/ExclaimerCloud.UI.Tests.csproj -c Release --logger "trx;LogFilePrefix=Results" --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --no-build'\n` +
      '            }\n' +
      '          }\n' +
      '        },\n' +
      "        lint: { builder: '@nx-dotnet/core:format', options: { verbosity: 'diagnostic', check: false } }\n" +
      '      },\n' +
      '      tags: []\n' +
      '    },\n' +
      "    'cloud-ui-frontend': {\n" +
      "      root: 'apps/cloud-ui/frontend',\n" +
      "      projectType: 'application',\n" +
      "      sourceRoot: 'apps/cloud-ui/frontend/src',\n" +
      "      prefix: 'app',\n" +
      '      architect: {\n' +
      '        build: {\n' +
      "          builder: '@nrwl/angular:webpack-browser',\n" +
      "          outputs: [ '{options.outputPath}' ],\n" +
      '          options: {\n' +
      "            outputPath: 'dist/apps/cloud-ui/frontend',\n" +
      "            index: 'apps/cloud-ui/frontend/src/index.html',\n" +
      "            main: 'apps/cloud-ui/frontend/src/main.ts',\n" +
      "            polyfills: 'apps/cloud-ui/frontend/src/polyfills.ts',\n" +
      "            tsConfig: 'apps/cloud-ui/frontend/tsconfig.app.json',\n" +
      "            inlineStyleLanguage: 'scss',\n" +
      '            assets: [\n' +
      "              'apps/cloud-ui/frontend/src/favicon.ico',\n" +
      "              'apps/cloud-ui/frontend/src/assets',\n" +
      "              'apps/cloud-ui/frontend/src/web.config',\n" +
      "              'apps/cloud-ui/frontend/src/.npmrc',\n" +
      "              { input: 'libs/cloud-ui/i18n/src/translations', glob: '**/*', output: 'assets/i18n' },\n" +
      "              { input: 'libs/shared/common/src/lib/i18n/translations', glob: '**/*', output: 'assets/i18n/common' }\n" +
      '            ],\n' +
      "            styles: [ 'apps/cloud-ui/frontend/src/scss/styles.scss' ],\n" +
      '            scripts: [],\n' +
      "            customWebpackConfig: { path: 'apps/cloud-ui/frontend/webpack.config.js' }\n" +
      '          },\n' +
      '          configurations: {\n' +
      '            production: {\n' +
      "              budgets: [ { type: 'initial', maximumWarning: '500kb', maximumError: '3mb' }, { type: 'anyComponentStyle', maximumWarning: '2kb', maximumError: '15kb' } ],\n" +
      "              fileReplacements: [ { replace: 'apps/cloud-ui/frontend/src/environments/environment.ts', with: 'apps/cloud-ui/frontend/src/environments/environment.prod.ts' } ],\n" +
      "              outputHashing: 'all',\n" +
      "              customWebpackConfig: { path: 'apps/cloud-ui/frontend/webpack.prod.config.js' }\n" +
      '            },\n' +
      '            development: { buildOptimizer: false, optimization: false, vendorChunk: true, extractLicenses: false, sourceMap: true, namedChunks: true }\n' +
      '          },\n' +
      "          defaultConfiguration: 'production',\n" +
      "          dependsOn: [ '^build' ]\n" +
      '        },\n' +
      '        serve: {\n' +
      "          builder: '@nrwl/angular:webpack-server',\n" +
      "          configurations: { production: { browserTarget: 'cloud-ui-frontend:build:production' }, development: { browserTarget: 'cloud-ui-frontend:build:development' } },\n" +
      "          defaultConfiguration: 'development',\n" +
      "          options: { port: 4200, publicHost: 'https://localhost:5001' }\n" +
      '        },\n' +
      "        'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'cloud-ui-frontend:build' } },\n" +
      "        lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'apps/cloud-ui/frontend/src/**/*.ts', 'apps/cloud-ui/frontend/src/**/*.html' ] } },\n" +
      '        test: {\n' +
      "          builder: '@angular-devkit/build-angular:karma',\n" +
      '          options: {\n' +
      "            main: 'apps/cloud-ui/frontend/src/test.ts',\n" +
      "            tsConfig: 'apps/cloud-ui/frontend/tsconfig.spec.json',\n" +
      "            karmaConfig: 'apps/cloud-ui/frontend/karma.conf.js',\n" +
      "            polyfills: 'apps/cloud-ui/frontend/src/polyfills.ts',\n" +
      "            styles: [ 'apps/cloud-ui/frontend/src/scss/styles.scss' ],\n" +
      "            stylePreprocessorOptions: { includePaths: [ 'apps/cloud-ui/frontend/src/scss' ] },\n" +
      '            scripts: [],\n' +
      '            assets: []\n' +
      '          },\n' +
      "          configurations: { production: { watch: false, browsers: 'ChromeHeadlessNoSandbox' } }\n" +
      '        },\n' +
      "        'serve-mfe': { builder: '@nrwl/workspace:run-commands', options: { commands: [ 'nx serve signature-analytics-frontend', 'nx serve cloud-ui-frontend' ] } },\n" +
      '        storybook: {\n' +
      "          builder: '@storybook/angular:start-storybook',\n" +
      "          options: { port: 4400, configDir: 'apps/cloud-ui/frontend/.storybook', browserTarget: 'cloud-ui-frontend:build', compodoc: false, styles: [ 'apps/cloud-ui/frontend/src/scss/styles.scss' ] },\n" +
      '          configurations: { ci: { quiet: true } }\n' +
      '        },\n' +
      "        'build-storybook': {\n" +
      "          builder: '@storybook/angular:build-storybook',\n" +
      "          outputs: [ '{options.outputPath}' ],\n" +
      '          options: {\n' +
      "            outputDir: 'dist/storybook/cloud-ui-frontend',\n" +
      "            configDir: 'apps/cloud-ui/frontend/.storybook',\n" +
      "            browserTarget: 'cloud-ui-frontend:build',\n" +
      '            compodoc: false,\n' +
      "            styles: [ 'apps/cloud-ui/frontend/src/scss/styles.scss' ]\n" +
      '          },\n' +
      '          configurations: { ci: { quiet: true } }\n' +
      '        }\n' +
      '      },\n' +
      "      tags: [ 'scope:cloud-ui', 'type:app' ],\n" +
      "      implicitDependencies: [ '!storybook-monorepo' ]\n" +
      '    },\n' +
      "    'cloud-ui-i18n': {\n" +
      "      root: 'libs/cloud-ui/i18n',\n" +
      "      projectType: 'library',\n" +
      "      sourceRoot: 'libs/cloud-ui/i18n/src',\n" +
      "      prefix: 'excl',\n" +
      '      architect: {\n' +
      '        build: {\n' +
      "          builder: '@nrwl/angular:ng-packagr-lite',\n" +
      "          outputs: [ 'dist/libs/cloud-ui/i18n' ],\n" +
      "          options: { project: 'libs/cloud-ui/i18n/ng-package.json' },\n" +
      "          configurations: { production: { tsConfig: 'libs/cloud-ui/i18n/tsconfig.lib.prod.json' }, development: { tsConfig: 'libs/cloud-ui/i18n/tsconfig.lib.json' } },\n" +
      "          defaultConfiguration: 'production',\n" +
      "          dependsOn: [ '^build' ]\n" +
      '        },\n' +
      '        test: {\n' +
      "          builder: '@angular-devkit/build-angular:karma',\n" +
      "          options: { main: 'libs/cloud-ui/i18n/src/test.ts', tsConfig: 'libs/cloud-ui/i18n/tsconfig.spec.json', karmaConfig: 'libs/cloud-ui/i18n/karma.conf.js' },\n" +
      "          configurations: { production: { watch: false, browsers: 'ChromeHeadlessNoSandbox' } }\n" +
      '        },\n' +
      "        lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'libs/cloud-ui/i18n/src/**/*.ts', 'libs/cloud-ui/i18n/src/**/*.html' ] } }\n" +
      '      },\n' +
      "      tags: [ 'scope:cloud-ui', 'scope:shared', 'type:i18n', 'type:common' ]\n" +
      '    },\n' +
      "    'cloud-ui-tests-api': {\n" +
      "      root: 'apps/cloud-ui/testing/ExclaimerCloud.UI.Automation/ExclaimerCloud.UI.Controller.Automation.SpecFlow',\n" +
      "      projectType: 'application',\n" +
      "      sourceRoot: 'apps/cloud-ui/testing/ExclaimerCloud.UI.Automation/ExclaimerCloud.UI.Controller.Automation.SpecFlow',\n" +
      "      implicitDependencies: [ 'cloud-ui-backend' ]\n" +
      '    },\n' +
      "    'cloud-ui-tests-e2e': {\n" +
      "      root: 'apps/cloud-ui/testing/ExclaimerCloud.UI.Automation/ExclaimerCloud.UI.Automation.SpecFlow',\n" +
      "      projectType: 'application',\n" +
      "      sourceRoot: 'apps/cloud-ui/testing/ExclaimerCloud.UI.Automation/ExclaimerCloud.UI.Automation.SpecFlow',\n" +
      "      implicitDependencies: [ 'cloud-ui-frontend', 'cloud-ui-backend' ]\n" +
      '    },\n' +
      "    'cloud-ui-types': {\n" +
      "      root: 'libs/cloud-ui/types',\n" +
      "      sourceRoot: 'libs/cloud-ui/types/src',\n" +
      "      projectType: 'library',\n" +
      '      architect: {\n' +
      '        build: {\n' +
      "          builder: '@nrwl/js:tsc',\n" +
      "          outputs: [ '{options.outputPath}' ],\n" +
      "          options: { outputPath: 'dist/libs/cloud-ui/types', main: 'libs/cloud-ui/types/src/index.ts', tsConfig: 'libs/cloud-ui/types/tsconfig.lib.json', assets: [ 'libs/cloud-ui/types/*.md' ] },\n" +
      "          dependsOn: [ '^build' ]\n" +
      '        },\n' +
      "        lint: { builder: '@nrwl/linter:eslint', outp"... 60961 more characters,
    '2022-08-03T07:02:00.483Z angular/cli config Error: Could not find a local workspace. Are you in a project?\n' +
      '    at promptAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\analytics\\analytics.js:118:15)\n' +
      '    at async createAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\analytics\\analytics.js:259:17)\n' +
      '    at async TestCommandModule.reportAnalytics (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\command-module.js:136:27)\n' +
      '    at async TestCommandModule.runSingleTarget (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\architect-base-command-module.js:37:9)\n' +
      '    at async TestCommandModule.run (C:\\repos\\excl\\exclaimercloud-ui\\node_modules\\@angular\\cli\\src\\command-builder\\architect-command-module.js:73:20)\n',
    '2022-08-03T07:02:00.483Z config Finished attempting automatic configuration for angular (1263ms)\n',
    '2022-08-03T07:02:00.483Z config Attempting automatic configuration for jest\n',
    "2022-08-03T07:02:00.486Z jest/config Error: Module jest-cli is not found in 'C:\\repos\\excl\\exclaimercloud-ui'.\n" +
      '    at Object.<anonymous> (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:31:10874)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:30:26170)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:30:25465)\n' +
      '    at c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:30:25374\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at n (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:30:25168)\n' +
      '    at Object.loadJest (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:31:8472)\n' +
      '    at c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:15830\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:20570)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19865)\n' +
      '    at c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19774\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at s (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19568)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:15518)\n' +
      '    at Object.<anonymous> (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19245)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:20570)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19865)\n' +
      '    at c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19774\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at s (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19568)\n' +
      '    at Object.n [as configure] (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:19126)\n' +
      '    at Config.<anonymous> (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:20323)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:12061)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:11356)\n' +
      '    at o (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:11105)\n',
    '2022-08-03T07:02:00.486Z config Finished attempting automatic configuration for jest (3ms)\n',
    '2022-08-03T07:02:00.486Z config Attempting automatic configuration for vitest\n',
    '2022-08-03T07:02:00.486Z vitest/config Error: Vitest dependency not found.\n' +
      '    at Object.<anonymous> (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:22469)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:24943)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:24238)\n' +
      '    at c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:24147\n' +
      '    at new Promise (<anonymous>)\n' +
      '    at n (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:23941)\n' +
      '    at Object.r [as configure] (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:19:21861)\n' +
      '    at Config.<anonymous> (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:20323)\n' +
      '    at r (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:12061)\n' +
      '    at Object.next (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:11356)\n' +
      '    at o (c:\\Users\\marley.powell\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.345\\wallabya610f5\\server.js:15:11105)\n',
    '2022-08-03T07:02:00.487Z config Finished attempting automatic configuration for vitest (1ms)\n'
  ]
}
smcenlly commented 2 years ago

We have seen some problems with upgraded nx / angular workspaces in the past where something in the migration hasn't generated correct configuration.


From your diagnostics report, we can't see anything that may be causing the problem.

Can you please confirm that your Angular tests are working from the command-line?


We set up an Angular v12 application and migrated it to v14 with karma tests and it is working for us. If your tests are working from the command-line and not Wallaby, as a next step, could you please create a new v14 workspaces with Angular and configure it to use Karma as the test runner.

After you have created the new v14 workspace, please confirm that Wallaby is working for you (you shouldn't have any issues).

Once you've done that, you should then be able to analyze the differences between your upgraded project configuration and the new project configuration to determine why it's not working and apply the differences to your upgraded project.

marleypowell commented 2 years ago

We have seen some problems with upgraded nx / angular workspaces in the past where something in the migration hasn't generated correct configuration.

From your diagnostics report, we can't see anything that may be causing the problem.

Can you please confirm that your Angular tests are working from the command-line?

We set up an Angular v12 application and migrated it to v14 with karma tests and it is working for us. If your tests are working from the command-line and not Wallaby, as a next step, could you please create a new v14 workspaces with Angular and configure it to use Karma as the test runner.

After you have created the new v14 workspace, please confirm that Wallaby is working for you (you shouldn't have any issues).

Once you've done that, you should then be able to analyze the differences between your upgraded project configuration and the new project configuration to determine why it's not working and apply the differences to your upgraded project.

This is still a problem.

I have created a reproduction here: https://github.com/marleypowell/nx-angular-wallabyjs-bug

Commands used:

npx create-nx-workspace --name wallabyjs-repro2 --preset=apps
yarn nx generate @nrwl/angular:application app1 --style=scss --unitTestRunner=karma
smcenlly commented 2 years ago

Thanks for the repo and instructions for reproducing. I tried this again on MacOS and it was fine but then tried and Windows and it's failing.

Will let you know when we have a fix for you.

smcenlly commented 2 years ago

We've identified some breaking changes in the latest version of NX for Windows. It seems to be caused by code within Angular, because of an incompatibiltity between NX and Angular workspace format / resolution.

Could you please update to Wallaby v1.0.1313. It should work for you.

marleypowell commented 2 years ago

Great it's working now. Thanks for the quick fix 🙂