React-fontawesome: Error on mounting and import {fontAwesomeIcon} in React shared components

Created on 21 Sep 2020  路  2Comments  路  Source: FortAwesome/react-fontawesome

in package.json:
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-fontawesome": "^0.1.11",

in a shared component (npm linked to a main project)....
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"

once compiled the log in the main repo that imports all the shared components breaks with this error:

Generating development JavaScript bundle failed

C:\Dev\dist\index.js: Unexpected token, expected ";" (31478:18)

31476 | function installNextTickImplementation() {
31477 | registerImmediate = function(handle) {

31478 | {"env": {}}.nextTick(function () { runIfPresent(handle); });
| ^
31479 | };
31480 | }
31481 |

File: ..\dist\index.js:31478:18

failed Re-building development bundle - 3.203s

------- i remove the

Most helpful comment

@csmaller @renan-khalibre I had the same issue. It was caused by dotenv-webpack version 3.0.0. Downgrading it to 2.0.0 resolved the issue.

All 2 comments

I'm having the same issue.

@csmaller @renan-khalibre I had the same issue. It was caused by dotenv-webpack version 3.0.0. Downgrading it to 2.0.0 resolved the issue.

Was this page helpful?
0 / 5 - 0 ratings