Compilation error using Angular 8 in prod mode

Posted by: sundaydavid on 31 October 2019, 8:12 am EST

    • Post Options:
    • Link

    Posted 31 October 2019, 8:12 am EST

    Hi,

    I’m getting a compilation error in prod mode (ng build --prod),

    gc.spread.sheets.angular.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 (https://goo.gl/jB3GVv).

  • Posted 31 October 2019, 4:04 pm EST

    Hi,

    For angular production mode, We need to copy the Angular wrapper file to our project and refer as a file module. Please refer to the following post:

    https://www.grapecity.com/forums/spread-sheets/angular-error-on-build-ple#helloyou-can-copy-the-angu_1

    Regards

    Sharad

  • Posted 5 May 2020, 6:51 pm EST

    Is this still the only wat to solve this or are there any plans to have the files packaged as a correct Angular package? Because this is not working well to be sure to have the latest version all the time.

  • Posted 6 May 2020, 5:40 pm EST

    Hi Iwan,

    We are sorry but this is still the recommended approach for angular projects. To automate the process you may write a post-install script to copy the file from @grapecity/spread-sheets-angular package to src.

    Further, I’ve asked the dev team for confirming the plan for this, will let you know about any updates regarding the same. (Internal tracking ID: 2340)

    Regards

  • Posted 13 June 2020, 11:51 pm EST

    Hello,

    just wondering if there has been any progress on this? It would be extremely helpful if the library was compiled using ng-packagr, instead of having to compile it ourselves each time.

    Thanks!

  • Posted 13 June 2020, 11:57 pm EST

    Please take a look at the recommended way of publishing libraries from the angular team: https://angular.io/guide/creating-libraries

    “Publishing your library

    Use the Angular CLI and the npm package manager to build and publish your library as an npm package. It is not recommended to publish Ivy libraries to NPM repositories. Before publishing a library to NPM, build it using the --prod flag which will use the older compiler and runtime known as View Engine instead of Ivy.”

    “Notice that the configured builder for the project is different from the default builder for app projects. This builder, among other things, ensures that the library is always built with the AOT compiler, without the need to specify the --prod flag.”

    Thanks!

  • Posted 14 June 2020, 7:40 pm EST

    Hi,

    We are sorry but copying “gc.spread.sheets.angular.ts” file is still the recommended solution.

    Thank you for the suggestion, I’ve forwarded it to the dev team and will let you know about their response.

    Regards

  • Posted 14 July 2020, 3:24 am EST

    my team and myself look forward for this too

  • Posted 14 July 2020, 8:50 pm EST

    Hi,

    I’ve added you as correspondence for this case. I’ll make sure to post updates regarding the case here.

    Regards

  • Posted 15 July 2020, 5:45 am EST

    Thank you very much, this is greatly appreciated.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels