wallabyjs / public

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

Automatic Angular CLI configuration error: Module jest-cli is not found in '.'. #3230

Closed bajere closed 1 year ago

bajere commented 1 year ago

Hi,

Is this plugin no longer supported on Webstorm? I have the latest versions of Webstorm and WallabyJs. Everything was fine, but now once updated, nothing works. I get the error below.

Automatic Angular CLI configuration error: Module jest-cli is not found in '.'.

We've also tried to automatically configure Wallaby.js for other frameworks
Automatic Jest configuration error: Module jest-cli is not found in '.'.
Automatic Vitest configuration error: Vitest dependency not found.

I have also tried various config files, but still no joy. Auto config is dead, which I had used before for a few years. I have also tried installing different jests, set various root locations etc. I can only assume support has been dropped? If so, not happy as I paid for a year, but I can at least stop wasting time trying to make it work...

Thanks,

smcenlly commented 1 year ago

Sorry to hear that you're having problems. We do fully support WebStorm and Automatic Angular CLI.

It looks like something may have gone wrong with your environment or your project.

Are you able to generate and share your Wallaby Diagnostic report for your project? The Wallaby Diagnostics Report is a simple JSON text report that contains some basic information about your Wallaby config and project that is required to start troubleshooting most Wallaby issues.

To share the report:


If you are unable to generate the diagnostic report, can you please provide us with:

  1. Your package.json file in the root of your project
  2. The contents of your Wallaby Console in your Run window after getting the error
bajere commented 1 year ago

Hi @smcenlly .

Good to know it's still supported! I have no diagnostic report; the option is greyed out... but here is the console:

wallaby.js started
core v1.0.1427
2023-06-07T07:08:22.145Z config Attempting automatic configuration for angular
2023-06-07T07:08:22.146Z angular/cli config Detecting Angular CLI.
2023-06-07T07:08:22.148Z angular/cli config Detected Angular CLI.
2023-06-07T07:08:22.149Z angular/cli config Angular currentDirPath: "/Users/username/Development/CargoOverseas/cargo.forwarding/spa", workspaceDirPath: "/Users/username/Development/CargoOverseas/cargo.forwarding/spa"
2023-06-07T07:08:22.150Z angular/cli jest project config Configuring.
2023-06-07T07:08:22.158Z angular/cli config Error: Module jest-cli is not found in '/Users/username/Development/CargoOverseas/cargo.forwarding/spa'.
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:4801)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19872)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19167)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19076
    at new Promise (<anonymous>)
    at s (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:18870)
    at Object.loadJest (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:2399)
    at t.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:14576)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:13604)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12899)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12808
    at new Promise (<anonymous>)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12602)
    at t.getConfigurationOnly (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:14256)
    at t.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:16677)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:13604)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12899)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12808
    at new Promise (<anonymous>)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12602)
    at t.configure (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:16555)
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:15662)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:19443)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:18738)
    at o (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:18497)
2023-06-07T07:08:22.160Z angular/cli config Angular.json: 
 {
  '$schema': './node_modules/@angular/cli/lib/config/schema.json',
  version: 1,
  newProjectRoot: 'projects',
  projects: {
    'cargof-website': {
      projectType: 'application',
      schematics: { '@schematics/angular:component': { style: 'scss', displayBlock: true, name: '', project: '' }, '@schematics/angular:application': { strict: true, name: '' } },
      root: '',
      sourceRoot: 'src',
      prefix: 'app',
      architect: {
        test: { builder: '@angular-builders/jest:run' },
        build: {
          builder: '@angular-builders/custom-webpack:browser',
          options: {
            outputPath: 'dist/cargof-website',
            index: 'src/index.html',
            main: 'src/main.ts',
            polyfills: 'src/polyfills.ts',
            tsConfig: 'tsconfig.app.json',
            inlineStyleLanguage: 'scss',
            assets: [
              'src/favicon.ico',
              'src/icons/android-chrome-192x192.png',
              'src/icons/android-chrome-512x512.png',
              'src/icons/apple-touch-icon.png',
              'src/icons/favicon-16x16.png',
              'src/icons/favicon-32x32.png',
              'src/icons/site.webmanifest',
              'src/assets'
            ],
            stylePreprocessorOptions: { includePaths: [ 'src/styles' ] },
            styles: [
              'src/styles/tailwind.scss',
              'src/styles/base.scss',
              './node_modules/mapbox-gl/src/css/mapbox-gl.css',
              './node_modules/@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css',
              './node_modules/flag-icon-css/css/flag-icons.min.css',
              'src/vendor/rb/reportbro.css',
              'src/styles/_variables.scss',
              'src/styles/preloader.scss',
              'src/styles/custom.scss',
              'src/styles/cf.scss',
              './node_modules/quill/dist/quill.snow.css'
            ],
            scripts: [ 'src/vendor/preloader.js', 'src/vendor/accountingjs.min.js', { input: 'src/vendor/rb/reportbro.js', inject: true } ],
            customWebpackConfig: { path: 'extra-webpack.config.js' }
          },
          configurations: {
            production: {
              budgets: [ { type: 'initial', maximumWarning: '500kb', maximumError: '10mb' }, { type: 'anyComponentStyle', maximumWarning: '2kb', maximumError: '500kb' } ],
              fileReplacements: [ { replace: 'src/environments/environment.ts', with: 'src/environments/environment.prod.ts' } ],
              outputHashing: 'all'
            },
            development: { buildOptimizer: false, optimization: false, vendorChunk: true, extractLicenses: false, sourceMap: true, namedChunks: true }
          },
          defaultConfiguration: 'production'
        },
        serve: {
          builder: '@angular-builders/custom-webpack:dev-server',
          options: { browserTarget: 'cargof-website:build' },
          configurations: { production: { browserTarget: 'cargof-website:build:production' }, development: { browserTarget: 'cargof-website:build:development' } },
          defaultConfiguration: 'development'
        },
        'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'cargof-website:build' } }
      }
    }
  },
  defaultProject: 'cargof-website'
}
2023-06-07T07:08:22.160Z angular/cli config Error: Module jest-cli is not found in '/Users/username/Development/CargoOverseas/cargo.forwarding/spa'.
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:4801)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19872)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19167)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19076
    at new Promise (<anonymous>)
    at s (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:18870)
    at Object.loadJest (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:2399)
    at t.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:14576)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:13604)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12899)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12808
    at new Promise (<anonymous>)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12602)
    at t.getConfigurationOnly (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:14256)
    at t.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:16677)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:13604)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12899)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12808
    at new Promise (<anonymous>)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:12602)
    at t.configure (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:16555)
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:15662)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:19443)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:18738)
    at o (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:16:18497)
2023-06-07T07:08:22.160Z config Finished attempting automatic configuration for angular (15ms)
2023-06-07T07:08:22.160Z config Attempting automatic configuration for jest
2023-06-07T07:08:22.161Z jest/config Detecting Jest.
2023-06-07T07:08:22.162Z jest/config Error: Module jest-cli is not found in '/Users/username/Development/CargoOverseas/cargo.forwarding/spa'.
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:4801)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19872)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19167)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:19076
    at new Promise (<anonymous>)
    at s (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:31:18870)
    at Object.loadJest (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:32:2399)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:30027
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:2677)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1972)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1881
    at new Promise (<anonymous>)
    at s (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1675)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:19:29715)
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1352)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:2677)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1972)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1881
    at new Promise (<anonymous>)
    at s (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1675)
    at Object.n [as configure] (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:1233)
    at Config.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:24267)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:15488)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:14783)
    at o (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:14532)
2023-06-07T07:08:22.162Z config Finished attempting automatic configuration for jest (2ms)
2023-06-07T07:08:22.162Z config Attempting automatic configuration for vitest
2023-06-07T07:08:22.162Z vitest/config Detecting Vitest.
2023-06-07T07:08:22.164Z vitest/config Error: Vitest dependency not found.
    at Object.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:4894)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:8150)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:7445)
    at /Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:7354
    at new Promise (<anonymous>)
    at n (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:7148)
    at Object.r [as configure] (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:20:4145)
    at Config.<anonymous> (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:24267)
    at r (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:15488)
    at Object.next (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:14783)
    at o (/Users/username/Library/Caches/JetBrains/WebStorm2023.1/wallaby/wallaby/server.js:15:14532)
2023-06-07T07:08:22.165Z config Finished attempting automatic configuration for vitest (2ms)
Failed to load configuration file: Automatic Angular CLI configuration error: Module jest-cli is not found in '.'.

We've also tried to automatically configure Wallaby.js for other frameworks
Automatic Jest configuration error: Module jest-cli is not found in '.'.
Automatic Vitest configuration error: Vitest dependency not found.
Please refer to our docs: https://wallabyjs.com/docs/config/overview.html 
smcenlly commented 1 year ago

Could you also please provide your package.json file?

bajere commented 1 year ago

Sure:

{
  "name": "cargof-website",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "start:proxy": "ng serve --host 0.0.0.0 --disable-host-check --proxy-config proxy.conf.json --live-reload",
    "build": "ng build",
    "build:stats": "ng build --stats-json",
    "analyze": "webpack-bundle-analyzer dist/cargof-website/stats.json",
    "build:prod": "ng build --configuration production",
    "watch": "ng build --watch --configuration development",
    "test": "jest",
    "jest": "jest --watch"
  },
  "private": true,
  "jest": {
    "preset": "jest-preset-angular",
    "testMatch": [
      "**/?(*.)+(spec).[jt]s?(x)"
    ],
    "clearMocks": true,
    "setupFilesAfterEnv": [
      "<rootDir>/setupJest.ts",
      "<rootDir>/jest.env.js"
    ],
    "roots": [
      "<rootDir>/src",
      "<rootDir>/test-helpers/"
    ],
    "detectOpenHandles": true,
    "collectCoverage": true,
    "forceExit": true,
    "collectCoverageFrom": [
      "./src/**/*.ts",
      "!./node_modules/*",
      "!./src/**/*.spec.ts"
    ],
    "coverageReporters": [
      "cobertura",
      "lcov"
    ],
    "coverageDirectory": "./coverage",
    "testEnvironment": "jsdom",
    "coverageThreshold": {
      "global": {
        "branches": 50,
        "functions": 50,
        "lines": 50
      }
    },
    "testTimeout": 30000,
    "coveragePathIgnorePatterns": [
      "/node_modules/",
      "\\bstate\\b",
      "/test-helpers/",
      "/src/testing/",
      "\\binterfaces\\b",
      "\\binterface\\b",
      "\\broutes\\b",
      "\\brouting\\b",
      "\\bactions\\b",
      "\\beffects\\b",
      "\\bmodule\\b",
      "\\bselector\\b",
      "\\breducer\\b",
      "/src/environments/",
      "\\benum\\b",
      "\\bconfig\\b",
      "\\bpolyfills\\b",
      "/src/app/modules/cds/entry-form-config/",
      "/src/app/models/"
    ],
    "moduleNameMapper": {
      "@root/(.*)": "src/app/$1",
      "@environments/(.*)": "src/environments/$1",
      "@test-helpers/(.*)": "test-helpers/$1",
      "^lodash-es$": "lodash",
      "^uuid$": "uuid"
    },
    "modulePaths": [
      "<rootDir>"
    ],
    "moduleDirectories": [
      "node_modules"
    ],
    "openHandlesTimeout": 0
  },
  "wallaby": {
    "trace": true
  },
  "dependencies": {
    "@angular/animations": "^14.0.3",
    "@angular/common": "^14.0.3",
    "@angular/compiler": "^14.0.3",
    "@angular/core": "^14.0.3",
    "@angular/forms": "^14.0.3",
    "@angular/material-date-fns-adapter": "^14.0.3",
    "@angular/material-moment-adapter": "^14.2.0",
    "@angular/platform-browser": "^14.0.3",
    "@angular/platform-browser-dynamic": "^14.0.3",
    "@angular/router": "^14.0.3",
    "@aws-amplify/auth": "^4.5.8",
    "@mapbox/mapbox-gl-geocoder": "^5.0.1",
    "@microsoft/applicationinsights-angularplugin-js": "^3.0.0",
    "@microsoft/applicationinsights-web": "^2.8.7",
    "@ngneat/input-mask": "^5.2.0",
    "@ngneat/spectator": "^11.1.0",
    "@ngneat/until-destroy": "^9.2.1",
    "@ngrx/component-store": "^14.3.2",
    "@ngrx/data": "^14.0.0",
    "@ngrx/effects": "^14.0.0",
    "@ngrx/entity": "^14.0.0",
    "@ngrx/router-store": "^14.0.0",
    "@ngrx/store": "^14.0.0",
    "@ngrx/store-devtools": "^14.0.0",
    "@ngx-formly/core": "^5.12.5",
    "@ngx-formly/material": "^5.12.5",
    "@swimlane/ngx-charts": "^20.1.0",
    "@turf/along": "^6.5.0",
    "@turf/turf": "^6.5.0",
    "@types/google-maps": "^3.2.3",
    "binpackingjs": "^3.0.2",
    "cuid": "^2.1.8",
    "date-fns": "^2.28.0",
    "date-fns-tz": "^1.3.5",
    "dinero.js": "^1.9.1",
    "fast-copy": "^2.1.3",
    "file-saver": "^2.0.5",
    "flag-icon-css": "^4.1.5",
    "geojson": "^0.5.0",
    "immer": "^9.0.15",
    "inputmask": "^5.0.7",
    "lodash-es": "^4.17.21",
    "mapbox-gl": "^2.7.1",
    "ngx-mapbox-gl": "^9.1.0",
    "ngx-quill": "^16.1.2",
    "ngx-ui-tour-core": "^9.0.1",
    "print-js": "^1.6.0",
    "quill": "^1.3.7",
    "quill-image-compress": "^1.2.26",
    "rxjs": "~7.5.5",
    "socket.io-client": "^4.5.1",
    "split.js": "^1.6.5",
    "string-format": "^2.0.0",
    "sweetalert2": "^11.4.19",
    "tslib": "^2.4.0",
    "uuid": "^8.3.2",
    "webpack": "^5.73.0",
    "zone.js": "~0.11.6"
  },
  "devDependencies": {
    "@angular-builders/custom-webpack": "^14.0.0",
    "@angular-builders/jest": "^14.0.0",
    "@angular-devkit/build-angular": "^14.0.3",
    "@angular/cdk": "^14.0.3",
    "@angular/cli": "^14.0.3",
    "@angular/compiler-cli": "^14.0.3",
    "@angular/material": "^14.0.3",
    "@fullhuman/postcss-purgecss": "^4.1.3",
    "@ngneat/spectator": "^10.0.1",
    "@ngx-formly/schematics": "^5.11.2",
    "@testing-library/angular": "^14.1.0",
    "@types/geojson": "^7946.0.8",
    "@types/google.maps": "^3.52.4",
    "@types/googlemaps": "^3.39.9",
    "@types/inputmask": "^5.0.3",
    "@types/jasmine": "~4.0.3",
    "@types/jest": "^28.1.6",
    "@types/lodash": "^4.14.182",
    "@types/mapbox-gl": "^2.7.3",
    "@types/node": "^18.15.11",
    "@types/quill": "^1.3.10",
    "@types/string-format": "^2.0.0",
    "d3-shape": "^3.1.0",
    "jasmine-core": "~4.2.0",
    "jest": "^29.5.0",
    "jest-preset-angular": "^13.1.1",
    "jest-websocket-mock": "^2.4.0",
    "lodash": "^4.17.21",
    "mock-socket": "^9.2.1",
    "moment": "^2.29.4",
    "postcss-import": "^14.0.2",
    "postcss-loader": "^6.1.1",
    "postcss-scss": "^4.0.0",
    "prettier": "^2.7.1",
    "tailwindcss": "^2.2.4",
    "typescript": "~4.6.2"
  }
}
smcenlly commented 1 year ago

We've taken a look at your package.json and it seems that there are some incompatibilities in your dependencies that are preventing us from installing the node modules using npm.

We suspect that perhaps your node_modules are corrupt. Can you please delete your node_modules and then reinstall them with npm install (or using your package manager) and then see if you still have a problem?

For us, after fixing the dependency versions (and we're not sure we've done the right thing), both Wallaby and jest will start on your project, but they don't run correctly because I don't have your project files.

bajere commented 1 year ago

I did try that but tried again just to be sure. Removing testing-library/angular from the package.json, as we do not use it, fixes the dependency issue, so it installs everything correctly.

For reference, project structure is:

-cf
--backend
--socket-server
--spa
   -- package.json

I get this error when setting the root path to the spa folder of the project, which is where the package.json sits:

Automatic Angular CLI configuration error: Module jest-cli is not found in '.'.

We've also tried to automatically configure Wallaby.js for other frameworks
Automatic Jest configuration error: Module jest-cli is not found in '.'.
Automatic Vitest configuration error: Vitest dependency not found.

If I move up a directory to cf, I get this:

wallaby.js started
core v1.0.1427
Failed to load configuration file: Automatic Jest configuration error: Module jest-cli is not found in '.'.

We've also tried to automatically configure Wallaby.js for other frameworks
Automatic Vitest configuration error: Vitest dependency not found.
Please refer to our docs: https://wallabyjs.com/docs/config/overview.html 
ArtemGovorov commented 1 year ago

@bajere Can you please share a screenshot of your Wallaby Run Configuration with your project structure expanded and visible on the screenshot (with cargo.forwarding/spa/node_modules folder expanded too)?

ArtemGovorov commented 1 year ago

@bajere your Wallaby Run Configuration root path is supposed to be pointing to a folder that should contain node_modules (and jest-cli should be in that node_modules).

bajere commented 1 year ago

Here is the finder view of the project:

Screenshot 2023-06-07 at 10 21 30

My root path is targeted to: cargo.forwarding/spa folder. nodejs is {SYSTEM DEFAULT}

its not possible to screen grab the directory, as its huge, but I did an ls on spa node_modules

jest-cli is in here:

node_modules % ls
@adobe                      jsesc
@ampproject                 json-buffer
@angular                    json-parse-better-errors
@angular-builders               json-parse-even-better-errors
@angular-devkit                 json-schema-traverse
@assemblyscript                 json5
@aws-amplify                    jsonc-parser
@aws-crypto                 jsonfile
@aws-sdk                    jsonparse
@babel                      karma-source-map-support
@bcoe                       kdbush
@cspotcode                  keyv
@csstools                   kind-of
@discoveryjs                    kleur
@esbuild                    klona
@fullhuman                  less
@gar                        less-loader
@hapi                       leven
@istanbuljs                 levn
@jest                       license-webpack-plugin
@jridgewell                 lilconfig
@leichtgewicht                  lines-and-columns
@mapbox                     loader-runner
@microsoft                  loader-utils
@ngneat                     locate-path
@ngrx                       lodash
@ngtools                    lodash-es
@ngx-formly                 lodash.debounce
@nodelib                    lodash.memoize
@npmcli                     lodash.throttle
@react-native                   lodash.topath
@react-native-community             log-symbols
@schematics                 logkitty
@sideway                    loose-envify
@sinclair                   lowercase-keys
@sindresorhus                   lru-cache
@sinonjs                    lz-string
@socket.io                  magic-string
@swimlane                   make-dir
@szmarczak                  make-error
@testing-library                make-fetch-happen
@tootallnate                    makeerror
@tsconfig                   map-cache
@turf                       map-obj
@types                      map-visit
@webassemblyjs                  mapbox-gl
@xtuc                       media-typer
@yarnpkg                    memfs
abab                        memoize-one
abbrev                      meow
abort-controller                merge-descriptors
absolute-path                   merge-stream
accepts                     merge2
acorn                       methods
acorn-globals                   metro
acorn-import-assertions             metro-babel-transformer
acorn-node                  metro-cache
acorn-walk                  metro-cache-key
adjust-sourcemap-loader             metro-config
agent-base                  metro-core
agentkeepalive                  metro-file-map
aggregate-error                 metro-hermes-compiler
ajv                     metro-inspector-proxy
ajv-formats                 metro-minify-terser
ajv-keywords                    metro-minify-uglify
amazon-cognito-identity-js          metro-react-native-babel-preset
anser                       metro-react-native-babel-transformer
ansi-colors                 metro-resolver
ansi-escapes                    metro-runtime
ansi-fragments                  metro-source-map
ansi-html-community             metro-symbolicate
ansi-regex                  metro-transform-plugins
ansi-styles                 metro-transform-worker
anymatch                    micromatch
appdirsjs                   mime
aproba                      mime-db
are-we-there-yet                mime-types
arg                     mimic-fn
argparse                    mimic-response
aria-query                  min-indent
arr-diff                    mini-css-extract-plugin
arr-flatten                 minimalistic-assert
arr-union                   minimatch
array-buffer-byte-length            minimist
array-flatten                   minimist-options
array-unique                    minipass
arrify                      minipass-collect
asap                        minipass-fetch
assign-symbols                  minipass-flush
ast-types                   minipass-json-stream
astral-regex                    minipass-pipeline
async                       minipass-sized
async-limiter                   minizlib
asynckit                    mixin-deep
atob                        mkdirp
autoprefixer                    mock-socket
available-typed-arrays              modern-normalize
babel-core                  moment
babel-jest                  ms
babel-loader                    multicast-dns
babel-plugin-istanbul               murmurhash-js
babel-plugin-jest-hoist             mute-stream
babel-plugin-polyfill-corejs2           nanoid
babel-plugin-polyfill-corejs3           nanomatch
babel-plugin-polyfill-regenerator       natural-compare
babel-plugin-syntax-trailing-function-commas    needle
babel-preset-current-node-syntax        negotiator
babel-preset-fbjs               neo-async
babel-preset-jest               ngx-mapbox-gl
balanced-match                  ngx-quill
base                        ngx-ui-tour-core
base-64                     nice-napi
base64-js                   nice-try
batch                       nocache
big.js                      node-addon-api
binary-extensions               node-dir
binpackingjs                    node-emoji
bl                      node-fetch
body-parser                 node-forge
bonjour-service                 node-gyp
boolbase                    node-gyp-build
bowser                      node-int64
brace-expansion                 node-releases
braces                      node-stream-zip
browser-process-hrtime              nopt
browserslist                    normalize-package-data
bs-logger                   normalize-path
bser                        normalize-range
buffer                      normalize-url
buffer-from                 npm-bundled
builtins                    npm-install-checks
bytes                       npm-normalize-package-bin
cacache                     npm-package-arg
cache-base                  npm-packlist
cacheable-lookup                npm-pick-manifest
cacheable-request               npm-registry-fetch
call-bind                   npm-run-path
caller-callsite                 npmlog
caller-path                 nth-check
callsites                   nullthrows
camelcase                   nwsapi
camelcase-css                   ob1
camelcase-keys                  object-assign
caniuse-lite                    object-copy
chalk                       object-hash
char-regex                  object-inspect
chardet                     object-is
chokidar                    object-keys
chownr                      object-visit
chrome-trace-event              object.assign
ci-info                     object.pick
cjs-module-lexer                obuf
class-utils                 on-finished
clean-stack                 on-headers
cli-cursor                  once
cli-spinners                    onetime
cli-width                   open
cliui                       optionator
clone                       ora
clone-deep                  os-tmpdir
clone-response                  p-cancelable
co                      p-finally
collect-v8-coverage             p-limit
collection-visit                p-locate
color                       p-map
color-convert                   p-retry
color-name                  p-try
color-string                    pacote
color-support                   pako
colorette                   parchment
combined-stream                 parent-module
command-exists                  parse-json
commander                   parse-node-version
commondir                   parse5
component-emitter               parse5-html-rewriting-stream
compressible                    parse5-htmlparser2-tree-adapter
compression                 parse5-sax-parser
concat-map                  parseurl
concaveman                  pascalcase
connect                     path-exists
connect-history-api-fallback            path-is-absolute
console-control-strings             path-key
content-disposition             path-parse
content-type                    path-to-regexp
convert-source-map              path-type
cookie                      pbf
cookie-signature                picocolors
copy-anything                   picomatch
copy-descriptor                 pify
copy-webpack-plugin             pirates
core-js-compat                  piscina
core-util-is                    pkg-dir
cosmiconfig                 point-in-polygon
create-require                  polygon-clipping
critters                    posix-character-classes
cross-spawn                 postcss
crypto-js                   postcss-attribute-case-insensitive
css-blank-pseudo                postcss-clamp
css-color-names                 postcss-color-functional-notation
css-has-pseudo                  postcss-color-hex-alpha
css-loader                  postcss-color-rebeccapurple
css-prefers-color-scheme            postcss-custom-media
css-select                  postcss-custom-properties
css-unit-converter              postcss-custom-selectors
css-what                    postcss-dir-pseudo-class
csscolorparser                  postcss-double-position-gradients
cssdb                       postcss-env-function
cssesc                      postcss-focus-visible
cssom                       postcss-focus-within
cssstyle                    postcss-font-variant
cuid                        postcss-gap-properties
d3-array                    postcss-image-set-function
d3-brush                    postcss-import
d3-color                    postcss-initial
d3-dispatch                 postcss-js
d3-drag                     postcss-lab-function
d3-ease                     postcss-load-config
d3-format                   postcss-loader
d3-geo                      postcss-logical
d3-hierarchy                    postcss-media-minmax
d3-interpolate                  postcss-modules-extract-imports
d3-path                     postcss-modules-local-by-default
d3-scale                    postcss-modules-scope
d3-selection                    postcss-modules-values
d3-shape                    postcss-nested
d3-time                     postcss-nesting
d3-time-format                  postcss-opacity-percentage
d3-timer                    postcss-overflow-shorthand
d3-transition                       postcss-page-break
d3-voronoi                  postcss-place
data-urls                   postcss-preset-env
date-fns                    postcss-pseudo-class-any-link
date-fns-tz                 postcss-replace-overflow-wrap
dayjs                       postcss-scss
debug                       postcss-selector-not
decamelize                  postcss-selector-parser
decamelize-keys                 postcss-value-parser
decimal.js                  potpack
decode-uri-component                prelude-ls
decompress-response             prettier
dedent                      pretty-bytes
deep-equal                  pretty-format
deep-is                     pretty-hrtime
deepmerge                   print-js
default-gateway                 proc-log
defaults                    process-nextick-args
defer-to-connect                promise
define-lazy-prop                promise-inflight
define-properties               promise-retry
define-property                 prompts
defined                     prop-types
delayed-stream                  protocol-buffers-schema
delegates                   proxy-addr
denodeify                   prr
density-clustering              psl
depd                        pump
dependency-graph                punycode
deprecated-react-native-prop-types      pure-rand
destroy                     purgecss
detect-newline                  qs
detect-node                 querystring
detective                   querystringify
didyoumean                  queue-microtask
diff                        quick-lru
diff-sequences                  quickselect
dinero.js                   quill
dir-glob                    quill-delta
dlv                     quill-image-compress
dns-equal                   randombytes
dns-packet                  range-parser
dom-accessibility-api               raw-body
dom-serializer                  rbush
domelementtype                  react
domexception                    react-devtools-core
domhandler                  react-is
domutils                    react-native
earcut                      react-native-codegen
ee-first                    react-native-get-random-values
electron-to-chromium                react-native-gradle-plugin
emittery                    react-refresh
emoji-regex                 react-shallow-renderer
emojis-list                 read-cache
encodeurl                   read-package-json
encoding                    read-package-json-fast
end-of-stream                   read-pkg
engine.io-client                read-pkg-up
engine.io-parser                readable-stream
enhanced-resolve                readdirp
entities                    readline
env-paths                   recast
envinfo                     redent
err-code                    reduce-css-calc
errno                       reflect-metadata
error-ex                    regenerate
error-stack-parser              regenerate-unicode-properties
errorhandler                    regenerator-runtime
es-get-iterator                 regenerator-transform
es-module-lexer                 regex-not
esbuild                     regex-parser
esbuild-darwin-64               regexp.prototype.flags
esbuild-wasm                    regexpu-core
escalade                    regjsparser
escape-html                 repeat-element
escape-string-regexp                repeat-string
escodegen                   replace-in-file
eslint-scope                    require-directory
esprima                     require-from-string
esrecurse                   require-main-filename
estraverse                  requires-port
esutils                     resolve
etag                        resolve-alpn
event-target-shim               resolve-cwd
eventemitter-asyncresource          resolve-from
eventemitter3                   resolve-protobuf-schema
events                      resolve-url
execa                       resolve-url-loader
exit                        resolve.exports
expand-brackets                 responselike
expect                      restore-cursor
express                     ret
extend                      retry
extend-shallow                  reusify
external-editor                 rfdc
extglob                     rgb-regex
fast-base64-decode              rgba-regex
fast-copy                   rimraf
fast-deep-equal                 robust-predicates
fast-diff                   run-async
fast-glob                   run-parallel
fast-json-stable-stringify          rw
fast-levenshtein                rxjs
fast-xml-parser                 safe-buffer
fastq                       safe-regex
faye-websocket                  safer-buffer
fb-watchman                 sass
figures                     sass-loader
file-saver                  sax
fill-range                  saxes
finalhandler                    scheduler
find-cache-dir                  schema-utils
find-up                     select-hose
flag-icon-css                   selfsigned
flow-parser                 semver
follow-redirects                send
for-each                    serialize-error
for-in                      serialize-javascript
form-data                   serve-index
forwarded                   serve-static
fraction.js                 set-blocking
fragment-cache                  set-value
fresh                       setprototypeof
fs-extra                    shallow-clone
fs-minipass                 shebang-command
fs-monkey                   shebang-regex
fs.realpath                 shell-quote
fsevents                    side-channel
function-bind                   signal-exit
functions-have-names                simple-swizzle
fuzzy                       sisteransi
gauge                       skmeans
gensync                     slash
geojson                     slice-ansi
geojson-equality                smart-buffer
geojson-rbush                   snapdragon
geojson-vt                  snapdragon-node
get-caller-file                 snapdragon-util
get-intrinsic                   socket.io-client
get-package-type                socket.io-parser
get-stream                  sockjs
get-value                   socks
gl-matrix                   socks-proxy-agent
glob                        source-map
glob-parent                 source-map-js
glob-to-regexp                  source-map-loader
globals                     source-map-resolve
globby                      source-map-support
gopd                        source-map-url
got                     sourcemap-codec
graceful-fs                 spdx-correct
grid-index                  spdx-exceptions
handle-thing                    spdx-expression-parse
hard-rejection                  spdx-license-ids
has                     spdy
has-bigints                 spdy-transport
has-flag                    splaytree
has-property-descriptors            split-string
has-proto                   split.js
has-symbols                 sprintf-js
has-tostringtag                 ssri
has-unicode                 stack-utils
has-value                   stackframe
has-values                  stacktrace-parser
hdr-histogram-js                static-extend
hdr-histogram-percentiles-obj           statuses
hermes-estree                   stop-iteration-iterator
hermes-parser                   string-format
hermes-profile-transformer          string-length
hex-color-regex                 string-width
hosted-git-info                 string_decoder
hpack.js                    strip-ansi
hsl-regex                   strip-bom
hsla-regex                  strip-eof
html-encoding-sniffer               strip-final-newline
html-entities                   strip-indent
html-escaper                    strip-json-comments
html-tags                   strnum
http-cache-semantics                stylus
http-deceiver                   stylus-loader
http-errors                 subtag
http-parser-js                  sudo-prompt
http-proxy                  suggestions
http-proxy-agent                supercluster
http-proxy-middleware               supports-color
http2-wrapper                   supports-preserve-symlinks-flag
https-proxy-agent               sweetalert2
human-signals                   symbol-observable
humanize-ms                 symbol-tree
iconv-lite                  tailwindcss
icss-utils                  tapable
ieee754                     tar
ignore                      temp
ignore-walk                 terser
image-size                  terser-webpack-plugin
immer                       test-exclude
immutable                   text-table
import-fresh                    throat
import-local                    through
imurmurhash                 through2
indent-string                   thunky
infer-owner                 tinyqueue
inflight                    tmp
inherits                    tmpl
ini                     to-fast-properties
inputmask                   to-object-path
inquirer                    to-regex
internal-slot                   to-regex-range
internmap                   toidentifier
invariant                   topojson-client
ip                      topojson-server
ipaddr.js                   tough-cookie
is-accessor-descriptor              tr46
is-arguments                    tree-kill
is-array-buffer                 trim-newlines
is-arrayish                 ts-jest
is-bigint                   ts-node
is-binary-path                  tsconfig-paths
is-boolean-object               tslib
is-buffer                   turf-jsts
is-callable                 type-check
is-color-stop                   type-detect
is-core-module                  type-fest
is-data-descriptor              type-is
is-date-object                  typed-assert
is-descriptor                   typescript
is-directory                    uglify-es
is-docker                   unfetch
is-extendable                   unicode-canonical-property-names-ecmascript
is-extglob                  unicode-match-property-ecmascript
is-fullwidth-code-point             unicode-match-property-value-ecmascript
is-generator-fn                 unicode-property-aliases-ecmascript
is-glob                     union-value
is-interactive                  unique-filename
is-lambda                   unique-slug
is-map                      universal-cookie
is-number                   universalify
is-number-object                unpipe
is-plain-obj                    unset-value
is-plain-object                 update-browserslist-db
is-potential-custom-element-name        uri-js
is-regex                    urix
is-set                      url
is-shared-array-buffer              url-parse
is-stream                   use
is-string                   use-sync-external-store
is-symbol                   util-deprecate
is-typed-array                  utils-merge
is-unicode-supported                uuid
is-weakmap                  v8-compile-cache-lib
is-weakset                  v8-to-istanbul
is-what                     validate-npm-package-license
is-windows                  validate-npm-package-name
is-wsl                      vary
isarray                     vlq
isexe                       vt-pbf
isobject                    w3c-hr-time
isomorphic-unfetch              w3c-xmlserializer
istanbul-lib-coverage               walker
istanbul-lib-instrument             watchpack
istanbul-lib-report             wbuf
istanbul-lib-source-maps            wcwidth
istanbul-reports                webidl-conversions
jasmine-core                    webpack
jest                        webpack-dev-middleware
jest-changed-files              webpack-dev-server
jest-circus                 webpack-merge
jest-cli                    webpack-sources
jest-config                 webpack-subresource-integrity
jest-diff                   websocket-driver
jest-docblock                   websocket-extensions
jest-each                   whatwg-encoding
jest-environment-jsdom              whatwg-fetch
jest-environment-node               whatwg-mimetype
jest-get-type                   whatwg-url
jest-haste-map                  which
jest-leak-detector              which-boxed-primitive
jest-matcher-utils              which-collection
jest-message-util               which-module
jest-mock                   which-typed-array
jest-pnp-resolver               wide-align
jest-preset-angular             wildcard
jest-regex-util                 word-wrap
jest-resolve                    wrap-ansi
jest-resolve-dependencies           wrappy
jest-runner                 write-file-atomic
jest-runtime                    ws
jest-serializer                 xml-name-validator
jest-snapshot                   xmlchars
jest-util                   xmlhttprequest-ssl
jest-validate                   xtend
jest-watcher                    y18n
jest-websocket-mock             yallist
jest-worker                 yaml
joi                     yargs
jquery                      yargs-parser
js-cookie                   yn
js-tokens                   yocto-queue
js-yaml                     zen-observable
jsc-android                 zen-observable-ts
jscodeshift                 zone.js
jsdom
ArtemGovorov commented 1 year ago

Can you please:

bajere commented 1 year ago

SUCCESS!

Okay, so we seem to have an issue using {SYSTEM DEFAULT} I replaced it with a direct path, and it all started working! Im using nvm too, so not sure if that is an issue on new versions of plugin/Webstorm?

Thanks for the help

smcenlly commented 1 year ago

Glad to hear you got it working. We don't believe it's a result of a WebStorm change as the latest WebStorm is working for us. It may also be a result of how you launch WebStorm.

You may refer to your operating system docs for how to set global / system path. Please note that if you're using a unix system, your shell initialisation script is unlikely to be the right place if you are launching WebStorm from your desktop / application launchpad.