Using spread sheet in Angular (trial version) with npm

Posted by: iteam on 24 May 2019, 6:24 pm EST

    • Post Options:
    • Link

    Posted 24 May 2019, 6:24 pm EST

    Hi everyone.

    I’m using the trial version of spread sheet javascript version on my angular application.

    I’ve seen that instead of downloading javascript files and put them in my project, I can use npm to install necessary module to use spread sheet in my application.

    I very like npm approach but something strange is happening sometimes:

    I don’t know how but sometime when I start my angular application with ng serve, compilation blocks and throws this error:

    ERROR in ./node_modules/@grapecity/spread-sheets-an

    gular/dist/gc.spread.sheets.angular.ts

    Module build failed (from ./node_modules/@ngtools/w

    ebpack/src/index.js):

    Error: C:\Java\IntelliJ_projects\myproject\node_modules@grapecity\spread-sheets-angular\di

    st\gc.spread.sheets.angular.ts is missing from the

    TypeScript compilation.

    Please make sure it is in y

    our 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 Angu

    lar Package Format (https://goo.gl/jB3GVv).

    at AngularCompilerPlugin.getCompiledFile (C:\Ja

    va\IntelliJ_projects\myproject\node_modu

    les@ngtools\webpack\src\angular_compiler_plugin.js

    :719:23) at plugin.done.then (C:\Java\IntelliJ_projects\myproject\node_modules@ngtools\webpack

    src\loader.js:41:31)

    at process._tickCallback (internal/process/next

    _tick.js:68:7)

    How can I solve?

    It’ probable that my team it’s going to buy licensed version of spread sheet after some test. Also with licensed edition we can use the sheet installing it via npm?

    Thanks in advance and have a great day!

    PS: we are using angular 7.3.3

  • Posted 26 May 2019, 9:47 pm EST

    Hi Tommaso,

    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

    Further, we have added an enhancement request to fix this so that angular wrapper could be used out of the box.(Internal tracking ID: 272865)

    Regards

  • Posted 28 February 2020, 4:37 am EST

    the same happens to me. The question is, when I buy the license, will I still use it in the same way when I install it through npm?

  • Posted 1 March 2020, 4:08 pm EST

    Hi Carlos,

    The usage of SJS remains the same after purchasing the license too.

    But instead of using the previously suggested workaround, you could also include the “@grapecity/spread-sheets-angular/dist/gc.spread.sheets.angular.ts” file into the TS compilation to avoid the issue. Add the following code in your tsconfig.app.json file:

    "include": [
        "src/**/*.ts",
    [b]    "node_modules/@grapecity/spread-sheets-angular/dist/gc.spread.sheets.angular.ts"[/b]
      ]
    

    Regards

Need extra support?

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

Learn More

Forum Channels