-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
'DropdownModule' is not exported by node_modules\ng2-bootstrap\ng2-bootstrap.js #1188
Comments
Rechecked, it is exported. Try console.log(dropModule), if it is undefined, than rollup was not able to resolve ng2-bootstrap npm module |
BTW better to use angular-cli |
which version of ng2-bootstrap are you using BTW? |
Found the issue. For this to work I have to use rollup-plugin-commonjs. |
@ctrl-brk What in particular did you do when "using rollup-plugin-commonjs"? I installed rollup-plugin-commonjs and added these statements to the rollup-config.js file:
Which I think worked for the angular 2 toaster because it removed the same error, but am still getting the DropdownModule error with this addition. |
Im getting this same error and don't know how to fix it with rollup-plugin-commonjs
and if I git rid of DropdownModule, then same error with CollapseModule, etc |
@quiringk - It looks like we're troubleshooting this at almost the same time. I think I've figured it out. In my rollup-config.js, I added: commonjs({ without that, it seemed it wasn't finding things in the ng2-bootstrap project. @valorkin - Thanks for the great work in this module. I think the __export(...) function in your ng2-bootstrap.js might be tripping up the rollup tool. But rather than rearranging that, you might just add a note to the docs in your angular2-quickstart project about adding the above to your rollup config. |
Nice good catch. Got confused because the URL the error gives you gives examples of NamedExports but you need to use a combination of "include" and "namedExports" |
I didn't seem to need the namedExports. Once I added the include, the rollup started to work. That said, I haven't thoroughly tested the build, just made sure that it generated an appropriately sized build artifact. |
Just to note that Might save someone few minutes... |
Can some one create a gist with simple how to with Rollin? So I can add it to docs? |
This still happening:
|
I'm getting similar error to @rochapablo
No changes were made to my code - yesterday it was working, today it isn't. I even restored from a previously functioning archive and now: npm start fails
|
@markbatbean, I was wrong. As I change the version I had to follow the new method to use the dropdown. As you can see here (http://valor-software.com/ng2-bootstrap/#/dropdowns#usage)
|
Yep, I am even writing change logs :( |
I edited my package.json to lock it to the previous version rather than allowing for updates. That is the easiest fix for most people. |
Check change log please, module was renamed |
Don't wanna sound snappy or so but why are there breaking changes in a minor-update anyway? |
My mistake, let's move on :) |
sure thanks for your effort & great work :) |
|
Hi guys, take care to keep up to date your ng2-bootstrap. The new bootstrap dependecy is now called ngx-bootstrap. "npm WARN deprecated ng2-bootstrap@1.3.3: ng2-bootstrap was renamed to ngx-bootstrap, please update your dependencies" |
hi ,I would have installed ngx-bootstrap. But I am getting below error |
@kamalakkanni angular v2 is not supported already |
Trying to use rollup for treeshaking as desribed here:http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/
Getting the error
'DropdownModule' is not exported by node_modules\ng2-bootstrap\ng2-bootstrap.js
when running rollup.Any idea what the issue could be? es2015 instead of es5?
The text was updated successfully, but these errors were encountered: