Failed to compile react webapp after using javascript prisma for mysql

70 views Asked by At

Hello beautiful humans!

I'm working on building a project that uses React Webapp for the frontend, using Prisma to go from javascript to MySql with Aiven to then Twitter API to create auto posts.

GitHub: https://github.com/jennjunod/twitter-tagging

Using this guide from Prisma... Using Miro as a visual representation

Failed to compile.

Error in ./src/reportWebVitals.js
Syntax error: 'import' and 'export' may only appear at the top level (3:0)

  1 | const reportWebVitals = onPerfEntry => {
  2 |   if (onPerfEntry && onPerfEntry instanceof Function) {
> 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
    | ^
  4 |       getCLS(onPerfEntry);
  5 |       getFID(onPerfEntry);
  6 |       getFCP(onPerfEntry);

 @ ./src/index.js 19:23-54
0

There are 0 answers