angular2-emoji icon indicating copy to clipboard operation
angular2-emoji copied to clipboard

Ionic 2

Open hfwittmann opened this issue 9 years ago • 2 comments

Hi,

I am trying to run this in ionic 2. However, I am not getting anywhere.

For instance if I start with (https://ionicframework.com/docs/v2/setup/tutorial/)

ionic start MyIonic2Project tutorial --v2 cd MyIonic2Project npm install npm install --save angular2-emoji

then follow your simplest example in "usage"

Then I try to run it, I get the complaint

typescript: node_modules/angular2-emoji/util/util.ts, line: 3 Cannot find name 'require'.

   L3:  let emojis = require('../db/emoji.json');

I tried npm install --save @types/node

But it does not help. But It wont run (timeout)

Cheers, Felix

hfwittmann avatar Dec 18 '16 11:12 hfwittmann

I have the same problem

twilroad avatar Jan 17 '17 03:01 twilroad

Add declare var require: any; to src/typings.d.ts

0nza1101 avatar Mar 02 '17 02:03 0nza1101