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

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

Solution:-

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 Sushil Kumar

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 *