Emoji dictionary cannot find modules. / Emojis

I am currently trying to use emoji dictionary in my project, but it won't start!

I am getting error index.js:2 Uncaught Error: Cannot find module "./emojis"

!

+3


source to share


1 answer


Since it appears I am assuming you are using Webpack and you have not configured json-loader

. emojis.json

is a file from a package emojilib

that is a dependency on emoji-dictionary

.

Install json-loader

:

npm install --save-dev json-loader

      

And then customize it:



module.exports = {
  module: {
    rules: [
      {
        test: /\.json$/,
        use: 'json-loader'
      }
    ]
  }
}

      

Read more json-loader

on GitHub.

If that doesn't solve the problem, you may need to explain the context a bit. It doesn't seem to be related to the package itself, because it works on my machine. πŸ˜…

+2


source







All Articles