wallabyjs / public

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

Not able to load HTML template with "require(" in angular 9. Getting error "[object Module]" #2337

Closed sunil-digicorp closed 4 years ago

sunil-digicorp commented 4 years ago

Below is my code with the module.

<pmd-card>
  <pmd-card-body>
    <button class="btn btn-sm pmd-btn-fab btn-light mb-2" type="button" (click)="codeExample.toggle()" pmdRipple>
      <i class="material-icons md-dark pmd-sm">code</i>
    </button>
    <div class="item" pmdCollapse #codeExample="pmd-collapse">
      <pmd-tab-group>
        <pmd-tab label="template" *ngIf="html">
          <pre class="prettyprint linenums lang-html">{{html}}</pre>
        </pmd-tab>
      </pmd-tab-group>
    </div>
    <div class="section bd-example"><ng-content></ng-content></div>
  </pmd-card-body>
</pmd-card>
{
    name: 'Examples',
    anchor: 'examples',
    outlet: ExamplesNoCardComponent,
    content: [
      {
        title: 'Angular Accordion',
        anchor: 'propeller-angular-accordion',
        description: `
          <p>Propeller Accordion consists of Bootstrap 4 HTML structure with Propeller customized tags.</p>
          <p>Add accordion item using <code>&lt;pmd-accordion-item&gt;</code> tag and to add title pass <code>heading</code> attribute in it. Wrap all the accordion items in a <code>&lt;pmd-accordion&gt;</code> tag to achieve the look and feel based on material design standards.</p>
        `,
        component: require('!!raw-loader!./demos/basic/basic'),
        html: require('!!raw-loader!./demos/basic/basic.html'),
      },
ArtemGovorov commented 4 years ago

Please share your Wallaby Diagnostics Report.

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 of Wallaby issues.

To share the report:

sunil-digicorp commented 4 years ago

@ArtemGovorov Thank you for the quick reply :)

I got the following error while run Copy Diagnostics Report command

Copy : Cannot find path 'D:\wamp\www\propeller\Frameworks\Angular\propeller-angular9\Diagnostics' because it does not exist.
At line:1 char:1
+ Copy Diagnostics Report
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\wamp\www\pro...ar9\Diagnostics:String) [Copy-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Below is my wallaby.js

'use strict';

const wallabyWebpack = require('wallaby-webpack');
const webpackPostprocessor = wallabyWebpack({
  entryPatterns: [
    'spec-bundle.js',
    'components/**/*spec.js'
  ],

  module: {
    loaders: [
      {test: /\.css$/, loader: 'raw-loader'},
      {test: /\.html$/, loader: 'raw-loader'}
    ]
  }
});

module.exports = function conifg() {
  return {
    files: [
      {pattern: 'spec-bundle.js', load: false},
      {pattern: 'components/**/*.ts', load: false},
      {pattern: 'components/**/*.css', load: false},
      {pattern: 'components/**/*.html', load: false},
      '!components/**/*.spec.ts'
    ],

    tests: [
      {pattern: 'components/**/*.spec.ts', load: false}
    ],

    testFramework: 'jasmine',

    env: {
      runner: require('phantomjs-prebuilt').path,  // eslint-disable-line
      params: {runner: '--web-security=false'}
    },

    postprocessor: webpackPostprocessor,

    setup: () => window.__moduleBundler.loadTests()  // eslint-disable-line
  };
};
ArtemGovorov commented 4 years ago

It looks like you are trying to run some command from PowerShell. However, the command needs to be run from your editor command palette (if you are using VS Code, press Ctrl + Shift + P and then select Copy Diagnostics Report).

sunil-digicorp commented 4 years ago

@ArtemGovorov Thank you for guiding me.

But I can't see Copy Diagnostics Report while press Ctrl + Shift + P

ArtemGovorov commented 4 years ago

@sunil-digicorp What code editor are you using?

sunil-digicorp commented 4 years ago

@ArtemGovorov VS Code

ArtemGovorov commented 4 years ago

Have you started Wallaby on the project before using the command? If not, please follow these instructions and start Wallaby first (and wait until you get the error) before trying to search for the command.

sunil-digicorp commented 4 years ago

@ArtemGovorov Hi this is the report I get.

{ editorVersion: '1.42.0',
  pluginVersion: '1.0.172',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.17134',
  nodeVersion: 'v10.16.0',
  coreVersion: '1.0.840',
  config:
   { diagnostics:
      { angular:
         { workspace:
            { '$schema': './node_modules/@angular/cli/lib/config/schema.json',
              version: 1,
              newProjectRoot: 'projects',
              projects:
               { 'pmd-angular-bootstrap':
                  { root: '',
                    sourceRoot: 'demo/src',
                    projectType: 'application',
                    architect:
                     { build:
                        { builder: '@angular-devkit/build-angular:browser',
                          options:
                           { outputPath: 'demo/dist/browser',
                             index: 'demo/src/index.html',
                             main: 'demo/src/main.ts',
                             tsConfig: 'demo/src/tsconfig.json',
                             aot: true,
                             polyfills: 'demo/src/polyfills.ts',
                             assets: [ 'demo/src/assets' ],
                             styles:
                              [ './node_modules/bootstrap/dist/css/bootstrap.min.css',
                                'src/datepicker/pmd-datepicker.scss',
                                'demo/src/assets/scss/style.scss',
                                'demo/src/assets/css/style.scss',
                                'demo/src/assets/css/prettify-angulario.css',
                                './node_modules/pmd-angular-bootstrap/datepicker/pmd-datepicker.scss' ],
                             scripts: [],
                             showCircularDependencies: false },
                          configurations:
                           { production:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: true,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.prod.ts' } ] },
                             ivy:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                tsConfig: 'demo/src/tsconfig-ivy.json',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: true,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.prod.ts' } ] },
                             server:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: false,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.server.ts' } ] } } },
                       serve:
                        { builder: '@angular-devkit/build-angular:dev-server',
                          options: { browserTarget: 'pmd-angular-bootstrap:build' },
                          configurations: { production: { browserTarget: 'pmd-angular-bootstrap:build:production' }, server: { browserTarget: 'pmd-angular-bootstrap:build:server' }, ivy: { browserTarget: 'pmd-angular-bootstrap:build:ivy' } } },
                       'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'pmd-angular-bootstrap:build' } },
                       test:
                        { builder: '@angular-devkit/build-angular:karma',
                          options:
                           { main: 'scripts/test.ts',
                             karmaConfig: 'karma-demo.conf.js',
                             polyfills: 'demo/src/polyfills.ts',
                             tsConfig: 'src/tsconfig.spec.json',
                             codeCoverageExclude: [ 'dist/**/*' ],
                             sourceMap: false,
                             scripts: [],
                             styles: [ 'src/datepicker/pmd-datepicker.scss', 'demo/src/assets/scss/style.scss', 'demo/src/assets/css/prettify-angulario.css' ],
                             assets: [ 'demo/src/assets' ] },
                          configurations: { ivy: { tsConfig: 'src/tsconfig-ivy.spec.json' } } },
                       lint: { builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ '../tslint.json' ], exclude: [] } },
                       server: { builder: '@angular-devkit/build-angular:server', options: { outputPath: 'demo/dist/server', main: 'demo/src/main.server.ts', tsConfig: 'demo/src/tsconfig.server.json' } } } } },
              defaultProject: 'pmd-angular-bootstrap',
              schematics: { '@schematics/angular:component': { prefix: '', styleext: 'scss' }, '@schematics/angular:directive': { prefix: '' } } },
           main:
            '\n            \n            import \'zone.js/dist/zone-testing\';  \n            import { getTestBed } from \'@angular/core/testing\';\n      \n            import {\n              BrowserDynamicTestingModule,\n              platformBrowserDynamicTesting\n            } from \'@angular/platform-browser-dynamic/testing\'; \n          \n            getTestBed().initTestEnvironment(\n              BrowserDynamicTestingModule,\n              platformBrowserDynamicTesting()\n            );' } },
     testFramework: { version: 'jasmine@3.4.0', configurator: 'jasmine@2.1.3', reporter: 'jasmine@2.1.3', starter: 'jasmine@2.1.3', autoDetected: true },
     env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
     files:
      [ { pattern: 'demo/src/**/*.spec.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/polyfills.ts', ignore: true, trigger: true, load: true },
        { pattern: 'scripts/test.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/main.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/index.html', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/test.base.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/test.wallaby.ts', ignore: false, trigger: true, load: true, order: 1 },
        { pattern: 'demo/src/**/*.+(ts|js)', load: false, ignore: false, trigger: true, order: 2 },
        { pattern: 'demo/src/**/*.+(css|less|scss|sass|styl|html|json|svg)', instrument: false, load: false, ignore: false, trigger: true, order: 3 } ],
     tests: [ { pattern: 'demo/src/**/*.spec.ts', load: false, ignore: false, trigger: true, test: true, order: 4 } ],
     filesWithNoCoverageCalculated: [],
     runAllTestsInAffectedTestFile: false,
     compilers: {},
     preprocessors: {},
     maxConsoleMessagesPerTest: 100,
     autoConsoleLog: true,
     delays: { run: 0, edit: 100, update: 0 },
     workers: { initial: 0, regular: 0, recycle: false },
     teardown: undefined,
     hints:
      { ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
        ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
        commentAutoLog: '?',
        testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' } },
     automaticTestFileSelection: true,
     runSelectedTestsOnly: false,
     extensions: {},
     reportUnhandledPromises: false,
     throwOnBeforeUnload: true,
     slowTestThreshold: 75,
     lowCoverageThreshold: 80,
     loose: true,
     configCode: 'auto.detect#-124439994' },
  packageJSON:
   { dependencies:
      { '@angular/localize': '9.0.0',
        'copy-dir': '1.2.0',
        'ng2-nouislider': '1.8.2',
        'node-sass': '4.13.1',
        nouislider: '14.0.2',
        'pmd-angular-bootstrap': 'file:pmd-angular-bootstrap-5.0.0.tgz',
        'popper.js': '1.15.0' },
     devDependencies:
      { '@angular-devkit/build-angular': '0.900.1',
        '@angular-devkit/core': '9.0.1',
        '@angular-devkit/schematics': '9.0.1',
        '@angular/animations': '9.0.0',
        '@angular/cli': '9.0.1',
        '@angular/common': '9.0.0',
        '@angular/compiler': '9.0.0',
        '@angular/compiler-cli': '9.0.0',
        '@angular/core': '9.0.0',
        '@angular/forms': '9.0.0',
        '@angular/language-service': '9.0.0',
        '@angular/platform-browser': '9.0.0',
        '@angular/platform-browser-dynamic': '9.0.0',
        '@angular/platform-server': '9.0.0',
        '@angular/router': '9.0.0',
        '@angular/service-worker': '9.0.0',
        '@applitools/eyes.cypress': '3.4.2',
        '@cypress/webpack-preprocessor': '4.1.1',
        '@nestjs/common': '6.11.6',
        '@nestjs/core': '6.0.5',
        '@nestjs/microservices': '6.0.5',
        '@nestjs/ng-universal': '0.5.1',
        '@nestjs/platform-express': '^6.0.1',
        '@netbasal/spectator': '3.9.1',
        '@nguniversal/common': '7.1.1',
        '@nguniversal/express-engine': '7.1.1',
        '@nguniversal/module-map-ngfactory-loader': '7.1.1',
        '@schematics/angular': '8.2.0',
        '@stackblitz/sdk': '1.3.0',
        '@types/node': '13.7.0',
        '@types/chai': '4.1.3',
        '@types/jasmine': '2.8.7',
        '@types/jasminewd2': '2.0.6',
        '@types/marked': '0.3.0',
        '@types/sinon': '2.3.7',
        '@types/tapable': '1.0.2',
        '@types/webpack': '4.1.6',
        bootstrap: '4.4.1',
        chai: '4.1.2',
        'classlist-polyfill': '1.2.0',
        codecov: '3.1.0',
        codelyzer: '5.0.1',
        compression: '1.7.2',
        'conventional-changelog-cli': '1.3.22',
        'conventional-github-releaser': '2.0.2',
        'core-js': '2.6.5',
        cpy: '7.0.0',
        'cpy-cli': '2.0.0',
        cypress: '3.4.1',
        express: '4.16.4',
        'gh-pages': '2.2.0',
        'gitignore-to-glob': '0.3.0',
        'google-code-prettify': '1.0.5',
        'html-loader': '0.5.5',
        husky: '1.0.0',
        intl: '^1.2.5',
        jasmine: '3.1.0',
        'jasmine-core': '3.1.0',
        'jasmine-data-provider': '2.2.0',
        'jasmine-spec-reporter': '4.2.1',
        json: '9.0.6',
        karma: '4.1.0',
        'karma-chrome-launcher': '2.2.0',
        'karma-cli': '^1.0.1',
        'karma-coverage-istanbul-reporter': '1.4.3',
        'karma-edge-launcher': '0.4.2',
        'karma-firefox-launcher': '1.1.0',
        'karma-ie-launcher': '1.0.0',
        'karma-jasmine': '1.1.2',
        'karma-jasmine-html-reporter': '1.1.0',
        'karma-remap-istanbul': '0.6.0',
        'karma-safari-launcher': '1.0.0',
        'karma-sauce-launcher': '1.2.0',
        'karma-typescript': '4.0.0',
        'lite-server': '2.3.0',
        lodash: '4.17.15',
        'mini-css-extract-plugin': '0.5.0',
        mocha: '5.1.1',
        'ng-packagr': '5.4.3',
        'ngm-cli': '1.0.4',
        'ngx-page-scroll': '6.0.1',
        'ngx-page-scroll-core': '6.0.1',
        nodemon: '1.18.10',
        'npm-run-all': '4.1.5',
        prettier: '1.12.1',
        'reflect-metadata': '0.1.13',
        'require-dir': '1.0.0',
        rollup: '0.58.2',
        'rollup-plugin-commonjs': '9.1.3',
        'rollup-plugin-node-resolve': '3.3.0',
        rxjs: '6.5.4',
        terser: '3.17.0',
        'ts-helpers': '^1.1.1',
        'ts-loader': '4.3.0',
        'ts-node': '6.0.3',
        'tsconfig-paths': '3.8.0',
        tsickle: '0.35.0',
        tslib: '1.10.0',
        tslint: '5.10.0',
        'tslint-config-valorsoft': '2.1.1',
        typedoc: '0.16.9',
        typescript: '3.7.5',
        'wait-on': '2.1.0',
        'wallaby-webpack': '3.9.15',
        'web-animations-js': '2.3.2',
        'webpack-bundle-analyzer': '3.6.0',
        'webpack-cli': '3.3.0',
        'zone.js': '0.10.2' } },
  fs: { numberOfFiles: 1451 },
  debug:
   [ '2020-02-12T07:42:10.312Z config Detected Angular CLI.\n',
     '2020-02-12T07:42:19.203Z angular/cli project config Using default D:/wamp/www/propeller/Frameworks/Angular/propeller-angular9/scripts/test.ts.\n',
     '2020-02-12T07:42:19.245Z config Configured Angular CLI.\n',
     '2020-02-12T07:42:19.247Z project Wallaby Node version: v10.16.0\n',
     '2020-02-12T07:42:19.247Z project Wallaby config: D:\\wamp\\www\\propeller\\Frameworks\\Angular\\propeller-angular9\\auto.detect\n',
     '2020-02-12T07:42:22.176Z project File cache: C:\\Users\\sunil.patel\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.172\\projects\\0d7081ab50809f2f\n',
     '2020-02-12T07:42:22.274Z uiService Listening port 51235\n',
     '2020-02-12T07:42:22.297Z project package.json file change detected, invalidating local cache\n',
     '2020-02-12T07:42:22.429Z workers Parallelism for initial run: 2, for regular run: 2\n',
     '2020-02-12T07:42:22.430Z workers Starting run worker instance #0\n',
     '2020-02-12T07:42:22.430Z workers Starting run worker instance #1\n',
     '2020-02-12T07:42:22.433Z workers Web server is listening at 55613\n',
     '2020-02-12T07:42:22.441Z project File cache requires some updates, waiting required files from IDE\n',
     '2020-02-12T07:42:22.857Z workers Started run worker instance (immediate) #0\n',
     '2020-02-12T07:42:22.857Z workers Started run worker instance (immediate) #1\n',
     '2020-02-12T07:42:25.535Z project Stopping process pool\n',
     '2020-02-12T07:42:25.536Z project Running postprocessor\n',
     '2020-02-12T07:42:25.567Z postprocessor Processing started.\n',
     '2020-02-12T07:42:25.567Z postprocessor Initializing.\n',
     '2020-02-12T07:42:25.570Z postprocessor Initializing entry.\n',
     '2020-02-12T07:42:25.571Z postprocessor Sanitizing configuration.\n',
     '2020-02-12T07:42:25.571Z postprocessor Adjusting configuration.\n',
     '2020-02-12T07:42:25.571Z postprocessor Creating compiler.\n',
     '2020-02-12T07:42:25.754Z postprocessor Customizing compiler.\n',
     '2020-02-12T07:42:25.754Z postprocessor Compilation started.\n',
     '2020-02-12T07:42:55.138Z project Error: \u001b[96mdemo/src/app/common/sidebar/sidebar.component.ts\u001b[0m:\u001b[93m8\u001b[0m:\u001b[93m29\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2307: \u001b[0mCannot find module \'src\'.\r\n\r\n\u001b[7m8\u001b[0m import { PmdCollapse } from \'src\';\r\n\u001b[7m \u001b[0m \u001b[91m                            ~~~~~\u001b[0m\r\n\u001b[96mdemo/src/app/components/+carousel/demo-carousel.module.ts\u001b[0m:\u001b[93m5\u001b[0m:\u001b[93m32\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2307: \u001b[0mCannot find module \'src/carousel\'.\r\n\r\n\u001b[7m5\u001b[0m import { CarouselModule } from \'src/carousel\';\r\n\u001b[7m \u001b[0m \u001b[91m                               ~~~~~~~~~~~~~~\u001b[0m\r\n\u001b[96mdemo/src/app/components/+carousel/demos/config/config.ts\u001b[0m:\u001b[93m2\u001b[0m:\u001b[93m32\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2307: \u001b[0mCannot find module \'src/carousel\'.\r\n\r\n\u001b[7m2\u001b[0m import { CarouselConfig } from \'src/carousel\';\r\n\u001b[7m \u001b[0m \u001b[91m                               ~~~~~~~~~~~~~~\u001b[0m\r\n\u001b[96mdemo/src/app/components/+tabs/demos/disabled/disabled.ts\u001b[0m:\u001b[93m2\u001b[0m:\u001b[93m29\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2307: \u001b[0mCannot find module \'src\'.\r\n\r\n\u001b[7m2\u001b[0m import { PmdTabGroup } from \'src\';\r\n\u001b[7m \u001b[0m \u001b[91m                            ~~~~~\u001b[0m\r\n\u001b[96mdemo/src/app/components/+tabs/demos/manual-selection/manual-selection.ts\u001b[0m:\u001b[93m2\u001b[0m:\u001b[93m29\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2307: \u001b[0mCannot find module \'src\'.\r\n\r\n\u001b[7m2\u001b[0m import { PmdTabGroup } from \'src\';\r\n\u001b[7m \u001b[0m \u001b[91m                            ~~~~~\u001b[0m\r\n\u001b[96msrc/spec/ng-bootstrap/collapse.spec.ts\u001b[0m:\u001b[93m7\u001b[0m:\u001b[93m10\u001b[0m - \u001b[91merror\u001b[0m\u001b[90m TS2305: \u001b[0mModule \'"D:/wamp/www/propeller/Frameworks/Angular/propeller-angular9/src/collapse"\' has no exported member \'CollapseModule\'.\r\n\r\n\u001b[7m7\u001b[0m import { CollapseModule } from \'../../collapse\';\r\n\u001b[7m \u001b[0m \u001b[91m         ~~~~~~~~~~~~~~\u001b[0m\r\n\n    at diagnostics_1.reportDiagnostics.msg (D:\\wamp\\www\\propeller\\Frameworks\\Angular\\propeller-angular9\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:846:99)\n    at Object.reportDiagnostics (D:\\wamp\\www\\propeller\\Frameworks\\Angular\\propeller-angular9\\node_modules\\@ngtools\\webpack\\src\\diagnostics.js:122:9)\n    at AngularCompilerPlugin._update (D:\\wamp\\www\\propeller\\Frameworks\\Angular\\propeller-angular9\\node_modules\\@ngtools\\webpack\\src\\angular_compiler_plugin.js:846:23)\n    at process._tickCallback (internal/process/next_tick.js:68:7)\n',
     '2020-02-12T07:42:55.140Z project Test run finished\n',
     '2020-02-12T07:42:55.140Z project Test run data re-queued\n' ] }
NikGovorov commented 4 years ago

Does ng test work for the project?

sunil-digicorp commented 4 years ago

@NikGovorov Yes ng test is working in my project. and got following error:

2 02 2020 14:12:34.431:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/ 12 02 2020 14:12:34.438:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited 12 02 2020 14:12:34.495:INFO [launcher]: Starting browser ChromeHeadless

ERROR in demo/src/app/common/sidebar/sidebar.component.ts:8:29 - error TS2307: Cannot find module 'src'.

8 import { PmdCollapse } from 'src';

demo/src/app/components/+carousel/demo-carousel.module.ts:5:32 - error TS2307: Cannot find module 'src/carousel'.

5 import { CarouselModule } from 'src/carousel';

demo/src/app/components/+carousel/demos/config/config.ts:2:32 - error TS2307: Cannot find module 'src/carousel'.

2 import { CarouselConfig } from 'src/carousel';

demo/src/app/components/+tabs/demos/disabled/disabled.ts:2:29 - error TS2307: Cannot find module 'src'.

2 import { PmdTabGroup } from 'src';

demo/src/app/components/+tabs/demos/manual-selection/manual-selection.ts:2:29 - error TS2307: Cannot find module 'src'.

2 import { PmdTabGroup } from 'src';


src/spec/ng-bootstrap/collapse.spec.ts:7:10 - error TS2305: Module '"D:/wamp/www/propeller/Frameworks/Angular/propeller-angular9/src/collapse"' has no exported member 'CollapseModule'.

7 import { CollapseModule } from '../../collapse';
NikGovorov commented 4 years ago

According to the output above you have typescript compilation errors. Once you fix them, please check that ng test works and after it try to run Wallaby.js again.

sunil-digicorp commented 4 years ago

@NikGovorov Hi this is the report I get after resolving the above error.

{ editorVersion: '1.42.0',
  pluginVersion: '1.0.172',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.17134',
  nodeVersion: 'v10.16.0',
  coreVersion: '1.0.841',
  config:
   { diagnostics:
      { angular:
         { workspace:
            { '$schema': './node_modules/@angular/cli/lib/config/schema.json',
              version: 1,
              newProjectRoot: 'projects',
              projects:
               { 'pmd-angular-bootstrap':
                  { root: '',
                    sourceRoot: 'demo/src',
                    projectType: 'application',
                    architect:
                     { build:
                        { builder: '@angular-devkit/build-angular:browser',
                          options:
                           { outputPath: 'demo/dist/browser',
                             index: 'demo/src/index.html',
                             main: 'demo/src/main.ts',
                             tsConfig: 'demo/src/tsconfig.json',
                             aot: true,
                             polyfills: 'demo/src/polyfills.ts',
                             assets: [ 'demo/src/assets' ],
                             styles:
                              [ './node_modules/bootstrap/dist/css/bootstrap.min.css',
                                'src/datepicker/pmd-datepicker.scss',
                                'demo/src/assets/scss/style.scss',
                                'demo/src/assets/css/style.scss',
                                'demo/src/assets/css/prettify-angulario.css',
                                './node_modules/pmd-angular-bootstrap/datepicker/pmd-datepicker.scss' ],
                             scripts: [],
                             showCircularDependencies: false },
                          configurations:
                           { production:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: true,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.prod.ts' } ] },
                             ivy:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                tsConfig: 'demo/src/tsconfig-ivy.json',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: true,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.prod.ts' } ] },
                             server:
                              { budgets: [ { type: 'anyComponentStyle', maximumWarning: '6kb' } ],
                                preserveSymlinks: true,
                                optimization: true,
                                outputHashing: 'all',
                                sourceMap: false,
                                extractCss: true,
                                namedChunks: true,
                                aot: true,
                                extractLicenses: true,
                                vendorChunk: false,
                                buildOptimizer: true,
                                fileReplacements: [ { replace: 'demo/src/environments/environment.ts', with: 'demo/src/environments/environment.server.ts' } ] } } },
                       serve:
                        { builder: '@angular-devkit/build-angular:dev-server',
                          options: { browserTarget: 'pmd-angular-bootstrap:build' },
                          configurations: { production: { browserTarget: 'pmd-angular-bootstrap:build:production' }, server: { browserTarget: 'pmd-angular-bootstrap:build:server' }, ivy: { browserTarget: 'pmd-angular-bootstrap:build:ivy' } } },
                       'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'pmd-angular-bootstrap:build' } },
                       test:
                        { builder: '@angular-devkit/build-angular:karma',
                          options:
                           { main: 'scripts/test.ts',
                             karmaConfig: 'karma-demo.conf.js',
                             polyfills: 'demo/src/polyfills.ts',
                             tsConfig: 'src/tsconfig.spec.json',
                             codeCoverageExclude: [ 'dist/**/*' ],
                             sourceMap: false,
                             scripts: [],
                             styles: [ 'src/datepicker/pmd-datepicker.scss', 'demo/src/assets/scss/style.scss', 'demo/src/assets/css/prettify-angulario.css' ],
                             assets: [ 'demo/src/assets' ] },
                          configurations: { ivy: { tsConfig: 'src/tsconfig-ivy.spec.json' } } },
                       lint: { builder: '@angular-devkit/build-angular:tslint', options: { tsConfig: [ '../tslint.json' ], exclude: [] } },
                       server: { builder: '@angular-devkit/build-angular:server', options: { outputPath: 'demo/dist/server', main: 'demo/src/main.server.ts', tsConfig: 'demo/src/tsconfig.server.json' } } } } },
              defaultProject: 'pmd-angular-bootstrap',
              schematics: { '@schematics/angular:component': { prefix: '', styleext: 'scss' }, '@schematics/angular:directive': { prefix: '' } } },
           main:
            '\n            \n            import \'zone.js/dist/zone-testing\';  \n            import { getTestBed } from \'@angular/core/testing\';\n      \n            import {\n              BrowserDynamicTestingModule,\n              platformBrowserDynamicTesting\n            } from \'@angular/platform-browser-dynamic/testing\'; \n          \n            getTestBed().initTestEnvironment(\n              BrowserDynamicTestingModule,\n              platformBrowserDynamicTesting()\n            );' } },
     testFramework: { version: 'jasmine@3.4.0', configurator: 'jasmine@2.1.3', reporter: 'jasmine@2.1.3', starter: 'jasmine@2.1.3', autoDetected: true },
     env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
     files:
      [ { pattern: 'demo/src/**/*.spec.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/polyfills.ts', ignore: true, trigger: true, load: true },
        { pattern: 'scripts/test.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/main.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/index.html', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/test.base.ts', ignore: true, trigger: true, load: true },
        { pattern: 'demo/src/test.wallaby.ts', ignore: false, trigger: true, load: true, order: 1 },
        { pattern: 'demo/src/**/*.+(ts|js)', load: false, ignore: false, trigger: true, order: 2 },
        { pattern: 'demo/src/**/*.+(css|less|scss|sass|styl|html|json|svg)', instrument: false, load: false, ignore: false, trigger: true, order: 3 } ],
     tests: [ { pattern: 'demo/src/**/*.spec.ts', load: false, ignore: false, trigger: true, test: true, order: 4 } ],
     filesWithNoCoverageCalculated: [],
     runAllTestsInAffectedTestFile: false,
     compilers: {},
     preprocessors: {},
     maxConsoleMessagesPerTest: 100,
     autoConsoleLog: true,
     delays: { run: 0, edit: 100, update: 0 },
     workers: { initial: 0, regular: 0, recycle: false },
     teardown: undefined,
     hints:
      { ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
        ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
        commentAutoLog: '?',
        testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' } },
     automaticTestFileSelection: true,
     runSelectedTestsOnly: false,
     extensions: {},
     reportUnhandledPromises: false,
     throwOnBeforeUnload: true,
     slowTestThreshold: 75,
     lowCoverageThreshold: 80,
     loose: true,
     configCode: 'auto.detect#-124439994' },
  packageJSON:
   { dependencies:
      { '@angular/localize': '9.0.0',
        'copy-dir': '1.2.0',
        'ng2-nouislider': '1.8.2',
        'node-sass': '4.13.1',
        nouislider: '14.0.2',
        'pmd-angular-bootstrap': 'file:pmd-angular-bootstrap-5.0.0.tgz',
        'popper.js': '1.15.0' },
     devDependencies:
      { '@angular-devkit/build-angular': '0.900.1',
        '@angular-devkit/core': '9.0.1',
        '@angular-devkit/schematics': '9.0.1',
        '@angular/animations': '9.0.0',
        '@angular/cli': '9.0.1',
        '@angular/common': '9.0.0',
        '@angular/compiler': '9.0.0',
        '@angular/compiler-cli': '9.0.0',
        '@angular/core': '9.0.0',
        '@angular/forms': '9.0.0',
        '@angular/language-service': '9.0.0',
        '@angular/platform-browser': '9.0.0',
        '@angular/platform-browser-dynamic': '9.0.0',
        '@angular/platform-server': '9.0.0',
        '@angular/router': '9.0.0',
        '@angular/service-worker': '9.0.0',
        '@applitools/eyes.cypress': '3.4.2',
        '@cypress/webpack-preprocessor': '4.1.1',
        '@nestjs/common': '6.11.6',
        '@nestjs/core': '6.0.5',
        '@nestjs/microservices': '6.0.5',
        '@nestjs/ng-universal': '0.5.1',
        '@nestjs/platform-express': '^6.0.1',
        '@netbasal/spectator': '3.9.1',
        '@nguniversal/common': '7.1.1',
        '@nguniversal/express-engine': '7.1.1',
        '@nguniversal/module-map-ngfactory-loader': '7.1.1',
        '@schematics/angular': '8.2.0',
        '@stackblitz/sdk': '1.3.0',
        '@types/node': '13.7.0',
        '@types/chai': '4.1.3',
        '@types/jasmine': '2.8.7',
        '@types/jasminewd2': '2.0.6',
        '@types/marked': '0.3.0',
        '@types/sinon': '2.3.7',
        '@types/tapable': '1.0.2',
        '@types/webpack': '4.1.6',
        bootstrap: '4.4.1',
        chai: '4.1.2',
        'classlist-polyfill': '1.2.0',
        codecov: '3.1.0',
        codelyzer: '5.0.1',
        compression: '1.7.2',
        'conventional-changelog-cli': '1.3.22',
        'conventional-github-releaser': '2.0.2',
        'core-js': '2.6.5',
        cpy: '7.0.0',
        'cpy-cli': '2.0.0',
        cypress: '3.4.1',
        express: '4.16.4',
        'gh-pages': '2.2.0',
        'gitignore-to-glob': '0.3.0',
        'google-code-prettify': '1.0.5',
        'html-loader': '0.5.5',
        husky: '1.0.0',
        intl: '^1.2.5',
        jasmine: '3.1.0',
        'jasmine-core': '3.1.0',
        'jasmine-data-provider': '2.2.0',
        'jasmine-spec-reporter': '4.2.1',
        json: '9.0.6',
        karma: '4.1.0',
        'karma-chrome-launcher': '2.2.0',
        'karma-cli': '^1.0.1',
        'karma-coverage-istanbul-reporter': '1.4.3',
        'karma-edge-launcher': '0.4.2',
        'karma-firefox-launcher': '1.1.0',
        'karma-ie-launcher': '1.0.0',
        'karma-jasmine': '1.1.2',
        'karma-jasmine-html-reporter': '1.1.0',
        'karma-remap-istanbul': '0.6.0',
        'karma-safari-launcher': '1.0.0',
        'karma-sauce-launcher': '1.2.0',
        'karma-typescript': '4.0.0',
        'lite-server': '2.3.0',
        lodash: '4.17.15',
        'mini-css-extract-plugin': '0.5.0',
        mocha: '5.1.1',
        'ng-packagr': '5.4.3',
        'ngm-cli': '1.0.4',
        'ngx-page-scroll': '6.0.1',
        'ngx-page-scroll-core': '6.0.1',
        nodemon: '1.18.10',
        'npm-run-all': '4.1.5',
        prettier: '1.12.1',
        'reflect-metadata': '0.1.13',
        'require-dir': '1.0.0',
        rollup: '0.58.2',
        'rollup-plugin-commonjs': '9.1.3',
        'rollup-plugin-node-resolve': '3.3.0',
        rxjs: '6.5.4',
        terser: '3.17.0',
        'ts-helpers': '^1.1.1',
        'ts-loader': '4.3.0',
        'ts-node': '6.0.3',
        'tsconfig-paths': '3.8.0',
        tsickle: '0.35.0',
        tslib: '1.10.0',
        tslint: '5.10.0',
        'tslint-config-valorsoft': '2.1.1',
        typedoc: '0.16.9',
        typescript: '3.7.5',
        'wait-on': '2.1.0',
        'wallaby-webpack': '3.9.15',
        'web-animations-js': '2.3.2',
        'webpack-bundle-analyzer': '3.6.0',
        'webpack-cli': '3.3.0',
        'zone.js': '0.10.2' } },
  fs: { numberOfFiles: 1423 },
  debug:
   [ '2020-02-14T09:33:22.289Z config Detected Angular CLI.\n',
     '2020-02-14T09:33:28.712Z angular/cli project config Using default D:/wamp/www/propeller/Frameworks/Angular/propeller-angular9/scripts/test.ts.\n',
     '2020-02-14T09:33:28.750Z config Configured Angular CLI.\n',
     '2020-02-14T09:33:28.752Z project Wallaby Node version: v10.16.0\n',
     '2020-02-14T09:33:28.752Z project Wallaby config: D:\\wamp\\www\\propeller\\Frameworks\\Angular\\propeller-angular9\\auto.detect\n',
     '2020-02-14T09:33:31.621Z project File cache: C:\\Users\\sunil.patel\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.172\\projects\\0d7081ab50809f2f\n',
     '2020-02-14T09:33:31.713Z uiService Listening port 51235\n',
     '2020-02-14T09:33:31.953Z workers Parallelism for initial run: 2, for regular run: 2\n',
     '2020-02-14T09:33:31.953Z workers Starting run worker instance #0\n',
     '2020-02-14T09:33:31.953Z workers Starting run worker instance #1\n',
     '2020-02-14T09:33:32.023Z workers Web server is listening at 65176\n',
     '2020-02-14T09:33:32.159Z project Stopping process pool\n',
     '2020-02-14T09:33:32.159Z project File cache is up-to-date, starting full test run\n',
     '2020-02-14T09:33:32.162Z project Running postprocessor\n',
     '2020-02-14T09:33:32.217Z postprocessor Processing started.\n',
     '2020-02-14T09:33:32.217Z postprocessor Initializing.\n',
     '2020-02-14T09:33:32.222Z postprocessor Initializing entry.\n',
     '2020-02-14T09:33:32.223Z postprocessor Sanitizing configuration.\n',
     '2020-02-14T09:33:32.223Z postprocessor Adjusting configuration.\n',
     '2020-02-14T09:33:32.223Z postprocessor Creating compiler.\n',
     '2020-02-14T09:33:32.389Z postprocessor Customizing compiler.\n',
     '2020-02-14T09:33:32.389Z postprocessor Compilation started.\n',
     '2020-02-14T09:33:52.689Z workers Started run worker instance (immediate) #0\n',
     '2020-02-14T09:33:52.689Z workers Started run worker instance (immediate) #1\n',
     '2020-02-14T09:33:59.434Z postprocessor Compilation finished.\n',
     '2020-02-14T09:34:00.309Z postprocessor Emitting 593 files.\n',
     '2020-02-14T09:34:00.312Z postprocessor Processing finished.\n',
     '2020-02-14T09:34:00.368Z project Postprocessor execution finished\n',
     '2020-02-14T09:34:00.368Z project Test run started; run priority: 3\n',
     '2020-02-14T09:34:00.368Z project Running all tests\n',
     '2020-02-14T09:34:00.421Z workers Starting test run, priority: 3\n',
     '2020-02-14T09:34:00.421Z chromeRunner Starting sandbox [worker #0, session #87dl0]\n',
     '2020-02-14T09:34:00.422Z chromeRunner Preparing sandbox [worker #0, session #87dl0]\n',
     '2020-02-14T09:34:00.423Z browserRunner Total files to load in sandbox: 5\n',
     '2020-02-14T09:34:00.426Z browserRunner Sandbox is generated [worker #0, session #87dl0]: http://localhost:65176/wallaby_sandbox0.html\n',
     '2020-02-14T09:34:00.426Z chromeRunner Prepared sandbox [worker #0, session #87dl0]\n',
     '2020-02-14T09:34:00.426Z workers [worker #0, session #87dl0] Running tests in sandbox\n',
     '2020-02-14T09:34:00.999Z workers [87dl0] Loaded 3 test(s)\n',
     '2020-02-14T09:34:01.061Z workers [87dl0] Run 0 test(s), skipped 3 test(s)\n',
     '2020-02-14T09:34:01.063Z workers [87dl0] Sandbox is responsive, closing it\n',
     '2020-02-14T09:34:01.065Z project Test run finished\n',
     '2020-02-14T09:34:01.066Z project Processed console.log entries\n',
     '2020-02-14T09:34:01.066Z project Processed loading sequences\n',
     '2020-02-14T09:34:01.066Z project Processed executed tests\n',
     '2020-02-14T09:34:01.071Z project Processed code coverage\n',
     '2020-02-14T09:34:01.082Z project Test run result processed and sent to IDE\n' ] }
smcenlly commented 4 years ago

@sunil-digicorp - your diagnostic report indicates that the tests in your project have been excluded from being run because .only or fit is being used with your tests (as per our running selected test(s) docs). Are you able to provide us a sample of your tests or else a sample repo of your project for us to help you confirm/fix?

sunil-digicorp commented 4 years ago

@smcenlly Thanks you for the help.

But, I resolved the issue with the downgrade "raw-loader" package "4.0.0" to "1.0.0".