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

'DragulaModule' is not exported by node_modules\ng2-dragula\index.js #530

Closed
mii9000 opened this issue Jan 25, 2017 · 11 comments
Closed

'DragulaModule' is not exported by node_modules\ng2-dragula\index.js #530

mii9000 opened this issue Jan 25, 2017 · 11 comments

Comments

@mii9000
Copy link

mii9000 commented Jan 25, 2017

@NathanWalker @valorkin

'DragulaModule' is not exported by node_modules\ng2-dragula\index.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
app\app.module.js (13:9)
11: import { BrowserModule } from '@angular/platform-browser';
12: import { AppComponent } from './app.component';
13: import { DragulaModule } from 'ng2-dragula';
             ^
14: import { FileUploadModule } from "ng2-file-upload";

rollup.config.js

import rollup      from 'rollup'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs    from 'rollup-plugin-commonjs';
import uglify      from 'rollup-plugin-uglify';

export default {
  entry: 'app/main.js',
  dest: 'dist/build.js',
  sourceMap: false,
  format: 'iife',
  plugins: [
      nodeResolve({jsnext: true, module: true}),
      commonjs({
        include: 'node_modules/rxjs/**',
      }),
      uglify()
  ]
}

Using Rollup for tree-shaking and build gives me the above error after successfully generating files with aot. Any suggestion is highly appreciated.

@alexlovato303
Copy link

@valorkin same issue as above

@valorkin
Copy link
Member

valorkin commented Feb 1, 2017

Exports should be named, but I don't have a time until Friday to fix it

@kgiroux
Copy link

kgiroux commented Feb 6, 2017

@valorkin do you have a release ready for this fix ?

Sincerely,

@HitomiTenshi
Copy link

Hi, I'd also be interested in a release fixing this issue. 👍

@gomesNazareth
Copy link

This same issue is there on ng2-file-upload too
Error: 'FileUploadModule' is not exported by node_modules/ng2-file-upload/ng2-file-upload.js

@kgiroux
Copy link

kgiroux commented Feb 21, 2017

No new about that ?

@PleasantD
Copy link

When will this be released? Need this for production.

@siddharthashw
Copy link

Getting the same issue in 1.5.0 version.

Even though I have used custom named exports

commonjs({
        include: 'node_modules/rxjs/**',
        namedExports: {
            'node_modules/ng2-dragula/ng2-dragula.js': ['DragulaModule', 'DragulaService']
        }
    }),

Need help
Thanks in advance

@xentatt
Copy link

xentatt commented Oct 9, 2017

Same issues as above.

@vikbi
Copy link

vikbi commented Jul 6, 2018

adding this line in to pollyfills.ts fixed my problem

(window as any).global = window;

@ghost
Copy link

ghost commented Oct 30, 2018

same issue here ng2 dragula fails my Angular 7 built is there any option to fix this

ERROR in node_modules/ng2-dragula/dist/MockDrake.d.ts(41,5): error TS2416: Property 'on' in type 'MockDrake' is not assignable to the same property in base type 'DrakeWithModels'.
Type '(event: string, callback: Function) => void' is not assignable to type '(events: string, callback: Function) => Drake'.
Type 'void' is not assignable to type 'Drake'.
src/app/theme/extension/event-calendar/event-calendar.module.ts(17,5): error TS2554: Expected 1-2 arguments, but got 0.

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

No branches or pull requests

10 participants