Ticket T622636
Visible to All Users

HTML5 Document Viewer - How to overcome the Globalize library registration issue in Angular CLI project

created 7 years ago (modified 7 years ago)

Hello,

I'm trying to integrate the report viewer component into my angular cli application and am not able to get the globalize package to work properly.

I found this issue Gosha submitted, but it appears unresolved.

Is there any way to get the report viewer component working in an angular cli project?  I see he mentions ng eject which isn't really an option for me.

Thanks!
Mark

Answers approved by DevExpress Support

created 7 years ago

Hi Mark,

Yes, this issue was not yet resolved by the Angular CLI team. In any case, there is a workaround that allows you to overcome this issue. So, the approach provided in the Document Viewer Integration in Angular2 help topic already includes this workaround, and the code demonstrated in our help topic should work correctly. You can also download the full source code that demonstrates this approach in action from the following code example page: T566419: How to use the Web Document Viewer in JavaScript with Angular2.

    Show previous comments (4)
    BM BM
    bruno mandarà 7 years ago

      i tried the gosha ticket, i updated to angular cli 6 and add into tsconfig.json the path globalize but but show me always the same error:

      C#
      ERROR in ./node_modules/devexpress-reporting/dx-designer.js Module not found: Error: Can't resolve 'I:\Angular\SednaCloud.UI5\src\node_modules\globalize\dist\globalize' in 'I:\Angular\SednaCloud.UI5\node_modules\devexpress-reporting' ERROR in ./node_modules/devexpress-reporting/node_modules/devextreme/localization/globalize/number.js Module not found: Error: Can't resolve 'I:\Angular\SednaCloud.UI5\src\node_modules\globalize\dist\globalize' in 'I:\Angular\SednaCloud.UI5\node_modules\devexpress-reporting\node_modules\devextreme\localization\globalize' ERROR in ./node_modules/devexpress-reporting/node_modules/devextreme/localization/globalize/core.js Module not found: Error: Can't resolve 'I:\Angular\SednaCloud.UI5\src\node_modules\globalize\dist\globalize' in 'I:\Angular\SednaCloud.UI5\node_modules\devexpress-reporting\node_modules\devextreme\localization\globalize'
      BM BM
      bruno mandarà 7 years ago

        this my tsconfig:

        C#
        { "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "target": "es5", "typeRoots": [ "node_modules/@types", "jquery", "ej.web.all" ], "lib": [ "es2017", "dom" ], "paths": { "globalize": [ "node_modules/globalize/dist/globalize" ], "globalize/*": [ "node_modules/globalize/dist/globalize/*" ], "cldr": [ "node_modules/cldrjs/dist/cldr" ], "cldr/*": [ "node_modules/cldrjs/dist/cldr/*" ] } } }

        but not work the same error

        Vasily (DevExpress Support) 7 years ago

          Hi Bruno,

          I've created a separate ticket on your behalf for this issue (T636809: Globalize library registration issue in Angular CLI 6 project). It has been placed in our processing queue and will be answered shortly.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.