Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.2.1-alpha.1: Module not found: Error: Can't resolve 'jszip' in \node_modules\devextreme\client_exporter #177

Closed
fdcastel opened this issue Oct 21, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@fdcastel
Copy link

I'm getting the following error with 16.2.1-alpha.1

ERROR in ./~/devextreme/client_exporter/excel_creator.js
Module not found: Error: Can't resolve 'jszip' in 'C:\temp\test-issue\node_modules\devextreme\client_exporter'
 @ ./~/devextreme/client_exporter/excel_creator.js 15:12-28
 @ ./~/devextreme/client_exporter.js
 @ ./~/devextreme/viz/core/export.js
 @ ./~/devextreme/viz/chart_components/base_chart.js
 @ ./~/devextreme/viz/chart.js
 @ ./~/devextreme-angular2/ui/chart.js
 @ ./~/devextreme-angular2/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main

I'm using angular-cli with this setup:

// angular-cli.json
      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/devextreme/dist/js/dx.all.js"
      ],

// app.module.ts
  imports: [
    BrowserModule,
    (...)
    DevExtremeModule
  ],

In 16.1.7 this works fine.

I also tried to change the scripts section of angular-cli.json to

// angular-cli.json
      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/devextreme/dist/js/jszip.min.js",
        "../node_modules/devextreme/dist/js/dx.all.js"
      ],

but the problem remains.

@kvet kvet self-assigned this Oct 21, 2016
@kvet kvet added the question label Oct 21, 2016
@kvet
Copy link
Contributor

kvet commented Oct 21, 2016

Hello,
 
In 16.2.1-alpha.1, it is no longer required to include the following scripts as global into angular-cli.json:

      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/devextreme/dist/js/jszip.min.js",
        "../node_modules/devextreme/dist/js/dx.all.js"
      ],

All devextreme-angular2 dependencies will be loaded by the module loading mechanism.

See also: #178

@kvet kvet closed this as completed Oct 21, 2016
@fdcastel
Copy link
Author

Sorry @kvet but I removed all scripts from angular-cli.json and the problem remains.

Please see the attached sample gh177-issue.zip. This is a clean project created with

ng init
npm install [email protected] --save

and added DevExtremeModule to app.module.ts.

Running ng serve gives the error

ERROR in ./~/devextreme/client_exporter/excel_creator.js
Module not found: Error: Can't resolve 'jszip' in 'C:\Temp\gh177-issue\node_modules\devextreme\client_exporter'
 @ ./~/devextreme/client_exporter/excel_creator.js 15:12-28
 @ ./~/devextreme/client_exporter.js
 @ ./~/devextreme/ui/data_grid/ui.data_grid.export_controller.js
 @ ./~/devextreme/ui/data_grid/ui.data_grid.js
 @ ./~/devextreme/ui/data_grid.js
 @ ./~/devextreme-angular2/ui/data-grid.js
 @ ./~/devextreme-angular2/index.js
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.ts
 @ multi main

@calabo-Act21
Copy link

Same issue here

@Aden-git
Copy link
Contributor

Hello!
 
Some of our components depend on the "jszip" library. When you use DevExtremeModule, you need to add the "jszip" library to your project. You can do this with npm:

npm install jszip --save

@ganySA
Copy link

ganySA commented May 16, 2018

I am still getting this issue in version 18.1.3 ?

@vottens
Copy link

vottens commented Jun 5, 2018

I am getting this error as well in version 18.1.3

@ibrahimyilmaz7
Copy link

I'm getting same error in 18.1.6 for command devextreme-bundler

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants