lathonez/angular2-signaturepad-demo

Module load failure

MmtBkn opened this issue · 3 comments

Hi,

I have existing ionic2 project, and tried to add angular2-signaturepad.

I installed it via npm. I edited config file like below.

      commonjs({
          include: [
            'node_modules/rxjs/**',
            'node_modules/angular2-signaturepad/**'
          ],
          namedExports: {
            'node_modules/angular2-signaturepad/signature-pad.js': ['SignaturePadModule']
          }
        }

How ever, when I import it from app.module.ts even without doing anything, I get

signature_pad.js:13Uncaught TypeError: Cannot set property 'SignaturePad' of undefined
Error, and it's pointing

root['SignaturePad'] = factory();

line. If it's relevant I use

"@ionic/app-scripts": "^0.0.36",
"typescript": "^2.0.3"

I appreciate for any help.

Thank you.

If you're on latest Ionic rc1, You don't need to touch any ionic config file, just import it as per the instructions on npm.

Also see the demo app: https://github.com/lathonez/angular2-signaturepad-demo

Ionic version is RC1. When I don't configure anything, I get following error:

bundle failed: 'SignaturePadModule' is not exported by node_modules/angular2-signaturepad/index.js 
            (imported by src/app/app.module.ts). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module 

Please provide a repro.

On 7 Nov 2016 03:45, "Muhammet" notifications@github.com wrote:

Ionic version is RC1. When I don't configure anything, I get following
error:

bundle failed: 'SignaturePadModule' is not exported by node_modules/angular2-signaturepad/index.js
(imported by src/app/app.module.ts). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG5tSFPavAM76tKRaim5uNOSoJhSTxeeks5q7ef1gaJpZM4KqfQt
.