title: Cannot find module '@fortawesome/react-fontawesome
body: <p>When i build my project i got error: Cannot find module '@fortawesome/react-fontawesome'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?</p>
  <p>Packages was installed with yarn as shown here <a href="https://fontawesome.com/how-to-use/on-the-web/using-with/react" rel="nofollow noreferrer">https://fontawesome.com/how-to-use/on-the-web/using-with/react</a></p>
  <p>Import in script:</p>
  <pre><code>import * as React from 'react';
  import Select from 'react-select';
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
  </code></pre>
  <p>webpack.config.js</p>
  <pre><code>var path = require('path');
  var HtmlWebpackPlugin = require('html-webpack-plugin')
  
  module.exports = {
    mode: 'development',
  
    entry: {
      task_creator: &quot;./src/service.tsx&quot;
    },
  
    output: {
      filename: '[name].js'
    },
    resolve: {
      modules:[
        path.resolve(__dirname, 'src'),
        'node_modules',
      ],
      extensions: ['.ts', '.tsx', '.js'],
    },
    module: {
        rules: [
          {
            test: /\.tsx$/, loader: 'ts-loader'
          },
          {
            test: /\.css$/,
            use: ['style-loader', 'css-loader']
          },
          {
            test: /\.(png|woff|woff2|eot|ttf|svg)$/,
            loader: 'url-loader'
          }
        ]
    },
  
    plugins: [
      new HtmlWebpackPlugin({
        title: 'service',
        filename: 'service.html',
        template: 'templates/service.html'
      })
    ]
  };
  </code></pre>
  <p>package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;service&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;description&quot;: &quot;Task assistant service web UI&quot;,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;webpack&quot;,
      &quot;dev:watch&quot;: &quot;webpack --watch&quot;,
      &quot;dist&quot;: &quot;webpack --mode production&quot;,
      &quot;lint&quot;: &quot;node node_modules/eslint/bin/eslint src --ext ts,tsx&quot;
    },
    &quot;dependencies&quot;: {
      &quot;react&quot;: &quot;17.0.2&quot;,
      &quot;react-dom&quot;: &quot;17.0.2&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@fortawesome/fontawesome-svg-core&quot;: &quot;1.2.35&quot;,
      &quot;@fortawesome/free-solid-svg-icons&quot;: &quot;5.15.3&quot;,
      &quot;@fortawesome/react-fontawesome&quot;: &quot;0.1.14&quot;,
      &quot;@types/react&quot;: &quot;17.0.3&quot;,
      &quot;@types/react-dom&quot;: &quot;17.0.3&quot;,
      &quot;@types/react-select&quot;: &quot;4.0.14&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;4.21.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;4.21.0&quot;,
      &quot;css-loader&quot;: &quot;5.2.0&quot;,
      &quot;eslint&quot;: &quot;7.23.0&quot;,
      &quot;eslint-plugin-import&quot;: &quot;2.22.1&quot;,
      &quot;eslint-plugin-promise&quot;: &quot;4.3.1&quot;,
      &quot;eslint-plugin-react&quot;: &quot;7.23.1&quot;,
      &quot;html-webpack-plugin&quot;: &quot;5.3.1&quot;,
      &quot;normalize.css&quot;: &quot;8.0.1&quot;,
      &quot;react-select&quot;: &quot;4.3.0&quot;,
      &quot;style-loader&quot;: &quot;2.0.0&quot;,
      &quot;ts-loader&quot;: &quot;8.1.0&quot;,
      &quot;typescript&quot;: &quot;4.2.3&quot;,
      &quot;url-loader&quot;: &quot;^4.1.1&quot;,
      &quot;webpack&quot;: &quot;5.30.0&quot;,
      &quot;webpack-cli&quot;: &quot;4.6.0&quot;
    }
  }
  </code></pre>
  <p>tsconfig.json</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;target&quot;: &quot;es6&quot;,
      &quot;removeComments&quot;: false,
      &quot;jsx&quot;: &quot;react&quot;
    },
    &quot;include&quot;: [
      &quot;src&quot;
    ]
  }
  </code></pre>