2

I am using meteor 1.4.1.1 with NPM support. I installed the npm "font-awesome" package and getting the error on the console "Uncaught Error: Cannot find module 'fontawesome'". I installed it with

meteor npm install --save font-awesome

The package seems to be installed correctly, folder inside of node_modules is created.

I imported the package in client/main.js with import fontawesome from 'font-awesome';

Sadly no icons are showing up, when i console.log(fontawesome); i get the above mentioned error back.

Thanks in advance, mario

Mario Deubler
  • 245
  • 1
  • 13
  • 2
    Do you want `font-awesome` (hyphen) or `fontawesome` (no hyphen)? Those are two different packages. – robertklep Sep 05 '16 at 12:49
  • font-awesome --> https://www.npmjs.com/package/font-awesome, sorry i put a spelling mistake in the import, i corrected it in the description – Mario Deubler Sep 05 '16 at 17:24

1 Answers1

0

There are different Font Awesome packages with almost the same name:

The first seems to be pretty useless for use in Node, or as a module, since it doesn't provide a main entry in its package.json.

Judging by your expectations ("no icons are showing up"), I think you want to install the second package (without the hyphen in the name), which shows the following for me:

$ node -pe 'require("fontawesome")'
{ [Function]
  glass: '�',
  music: '�',
  search: '�',
  envelopeO: '�',
  ...
robertklep
  • 198,204
  • 35
  • 394
  • 381