J324
J324

Reputation: 13

How do I fix this error; unexpected token 'react' when using react-moralis

I was able to install the package for react-moralis without any issues. When trying to import from the package I receive an "unexpected token failed to compile" syntax error. The simple code is this

import { Moralis} from react-moralis

Failed to compile error

Upvotes: 0

Views: 32

Answers (1)

User456
User456

Reputation: 1301

Put it in quotes like this:

import { Moralis } from 'react-moralis'

Upvotes: 1

Related Questions