Import is not working in React. Showing SyntaxError unexpected token ‘<'


Go to Jest-config.js

and put this command that is

transformIgnorePatterns: ["<rootDir>/node_modules/(?![a-z])"],

Save and Run it you program/application will work.

Thank you.

About admin

Check Also

How to fetch API Data from API in React Using useEffect?

import React, { useState, useEffect } from "react"; // Use can use css from this …

Leave a Reply

Your email address will not be published. Required fields are marked *