I Just created a react app. The npm start
seems to work fine but npm run build
is constantly failing. I need to run npm run build
to deploy it on some website.
Already gone through all posts related to this on stackoverflow.com
. But didn't found any working solution.
import './App.css';
import 'https://kit.fontawesome.com/a076d05399.js'
import Navbar from './components/navbar';
import Homepage from './components/homepage';
import Skills from './components/Skills';
import Project from './components/project';
import Contact from './components/contact';
Error Message
Failed to compile.
The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script
npx create-react-app <project-name>
– Dissertateimport 'https://kit.fontawesome.com/a076d05399.js'
. Why don't you usefont-awesome
from npm? – Peripheral@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
– Dissertate