Base solution for your next web application
Open Closed

Getting error when running npm start #5116


User avatar
0
thor created

I have updated to 5.4.1 a couple of days ago. When I try to run code generated by the RAD Tool I get the following error:

ERROR in ./node_modules/abp-ng2-module/src/notify/notify.service.ts Module build failed: Error: C:\Repos\Danely\angular\node_modules\abp-ng2-module\src\notify\notify.service.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (<a class="postlink" href="https://goo.gl/jB3GVv">https://goo.gl/jB3GVv</a>). at AngularCompilerPlugin.getCompiledFile (C:\Repos\Danely\angular\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:709:23) at plugin.done.then (C:\Repos\Danely\angular\node_modules@ngtools\webpack\src\loader.js:41:31) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)

I should also mention that since the upgrade it takes forever to complete sourcemap (it is stuck at 92%) since the upgrade.

Have you seen this before? Do you know why this would be?


7 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Run refresh.bat.

  • User Avatar
    0
    thor created

    That was the first I tried (After deleting yarn.lock and running yarn again). I then tried lots of different things but I think it was running ng build that finally fixed it. Still hangs on 92% when running npm start...

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @thor,

    Be sure that value of "@abp/*" in your tsconfig.json is same with <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/tsconfig.json#L19">https://github.com/aspnetzero/aspnet-ze ... g.json#L19</a>.

  • User Avatar
    0
    thor created

    Thank you for getting back. I looked at that as well. Below is the full tsconfig.json file

    { "compilerOptions": { "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es6", "dom" ], "mapRoot": "./", "module": "es6", "skipLibCheck": true, "moduleResolution": "node", "outDir": "../dist/out-tsc", "sourceMap": true, "target": "es5", "typeRoots": [ "../node_modules/@types" ], "baseUrl": ".", "paths": { "@abp/": [ "../node_modules/abp-ng2-module/dist/src/" ], "@app/": [ "./app/" ], "@shared/": [ "./shared/" ], "@node_modules/": [ "../node_modules/" ], "@angular/": [ "../node_modules/@angular/" ] } }, "exclude": [ "node_modules" ] }

    I can now compile and run the application. The only "problem" is that it takes a loooong time to complete the sourcemap process. There is a lot of people talking about getting stuck on 92% when reading various forums (see for instance <a class="postlink" href="https://stackoverflow.com/questions/49184787/92-chunk-asset-optimization-webpack">https://stackoverflow.com/questions/491 ... on-webpack</a> ) . Before upgrading to 5.4.1 I don't recall this taking minutes, but it is now. If I am the only one with this problem then it could be a merge problem or something else I have done...

  • User Avatar
    0
    ismcagdas created
    Support Team

    @thor,

    We haven't faced such a problem. Are you using latest angular-cli globally ?

  • User Avatar
    0
    thor created
    C:\Repos\Danely\angular>ng -v
    
         _                      _                 ____ _     ___
        / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
       / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
      / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
     /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                    |___/
    
    
    Angular CLI: 6.0.0
    Node: 8.9.3
    OS: win32 x64
    Angular: 6.0.0
    ... animations, cli, common, compiler, compiler-cli, core, forms
    ... http, platform-browser, platform-browser-dynamic
    ... platform-server, router
    
    Package                           Version
    -----------------------------------------------------------
    @angular-devkit/architect         0.6.0
    @angular-devkit/build-angular     0.6.1
    @angular-devkit/build-optimizer   0.6.1
    @angular-devkit/core              0.6.0
    @angular-devkit/schematics        0.6.0
    @ngtools/webpack                  6.0.1
    @schematics/angular               0.6.0
    @schematics/update                0.6.0
    rxjs                              6.1.0
    typescript                        2.7.2
    webpack                           4.6.0
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @thor,

    1. Does it finish even if it takes long time ?
    2. Do you have any warnings when you run "npm start" on the command prompt ?