Got the same error when running ionic serve.
In my console it says:
rollup: No name was provided for external module 'buffer' in options.globals – guessing 'buffer'```
And then I get the ``Error: Cannot read property 'buffer' of undefined`` in my JS console.
Running Ionic 2 RC.0.
Created a new ionic app using ionic startapp and moved&converted my old beta.11 code to the new project.
Must has something to do with a missing dependency I guess, but it's hard to track down which one exactly
For me, the issue was caused by the latest version of angular2-jwt (v0.1.19).
This imports Base64 from js-base64, which uses ‘buffer’.
I’ve downgraded angular2-jwt to the version I used prior to upgrading my Ionic project to RC.0, and now, with version 0.1.12, js-base64 is not used and I don’t get the error anymore.
But need to find a better solution.
Is this a dependency problem in angular2-jwt (which doesnt play well with angular or ionic?) or do I need to do some extra configuration for Rollup?
No, for me this solution works for now. There are some more issues which I need to solve first.
Also I red that Ionic might change their default build script to Webpack, so I’ll wait for the final release before I dive into these specific import issues.