angular-emojify icon indicating copy to clipboard operation
angular-emojify copied to clipboard

SystemJS configuration in angular2 when install node-emoji

Open weishiny opened this issue 8 years ago • 3 comments

Hi, @kamilkisiela

I just follow your way to create my own emoji pipe for angular2 by using node-emoji, but I just encounter a problem that is related to SystemJS configuration, could you share how do you configure your system.config.js when you install node-emoji? I appreciate you in advance. Thanks a lot

weishiny avatar Apr 12 '17 01:04 weishiny

I found out the one of errors is string.prototype.codepointat 404, whether you have installed string.prototype.codepointat by npm?

weishiny avatar Apr 12 '17 01:04 weishiny

Hi @kamilkisiela,

after using your module, and config SystemJS I've already solved the problem about string.prototype.codepointat and not finding emoji.json.js, but we encounter another problem, whether you bumped into this problem as well?

"Error: (SystemJS) Unexpected token : SyntaxError: Unexpected token : at eval () at Object.eval (http://localhost:3000/node_modules/angular2-emojify/build/src/index.js:3:20) at eval (http://localhost:3000/node_modules/angular2-emojify/build/src/index.js:35:4) at eval (http://localhost:3000/node_modules/angular2-emojify/build/src/index.js:36:3) at eval () Evaluating http://localhost:3000/node_modules/node-emoji/lib/emoji.json Evaluating http://localhost:3000/node_modules/angular2-emojify/build/src/index.js Evaluating http://localhost:3000/app/apply/apply.module.js Evaluating http://localhost:3000/app/app.module.js Evaluating http://localhost:3000/main.js Error loading http://localhost:3000/main.js at ZoneAwareError (http://localhost:3000/node_modules/zone.js/dist/zone.js:992:33) at addToError (http://localhost:3000/node_modules/systemjs/dist/system.src.js:122:78) at linkSetFailed (http://localhost:3000/node_modules/systemjs/dist/system.src.js:687:15) at http://localhost:3000/node_modules/systemjs/dist/system.src.js:624:9 at doDynamicExecute (http://localhost:3000/node_modules/systemjs/dist/system.src.js:769:7) at link (http://localhost:3000/node_modules/systemjs/dist/system.src.js:964:20) at doLink (http://localhost:3000/node_modules/systemjs/dist/system.src.js:623:7) at updateLinkSetOnLoad (http://localhost:3000/node_modules/systemjs/dist/system.src.js:669:18) at http://localhost:3000/node_modules/systemjs/dist/system.src.js:485:11 at ZoneDelegate.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:334:26) at Zone.run (http://localhost:3000/node_modules/zone.js/dist/zone.js:126:43) at http://localhost:3000/node_modules/zone.js/dist/zone.js:713:57 at ZoneDelegate.invokeTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:367:31) at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:166:47) at drainMicroTaskQueue (http://localhost:3000/node_modules/zone.js/dist/zone.js:546:35) at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:424:25)"

weishiny avatar Apr 12 '17 03:04 weishiny

I recently renamed the package, it's now angular-emojify.

There's a umd bundle available and even es6 modules!

About SystemJS, try to update to the latest and use it like this:

'angular-emojify': { main: '/build/bundles/emojify.umd.js' }

kamilkisiela avatar Apr 19 '17 08:04 kamilkisiela