I want to clone a project from github.
I first did git clone https://github.com/pancakeswap/pancake-frontend and than i ran npm install and after that i did npm run.
But when the project opens in my browser I got this error:
Failed to compile
./src/index.js
SyntaxError: /home/ether/Documents/pancakeclone/pancake-frontend/src/index.js: Unexpected token (7:38)
5 | var App_1 = require("./App");
6 | var Providers_1 = require("./Providers");
> 7 | react_dom_1["default"].render(<react_1["default"].StrictMode>
| ^
8 | <Providers_1["default"]>
9 | <App_1["default"] />
10 | </Providers_1["default"]>
I did a google search but nothing helpful came up So maybe someone on here can exyplain me what im doing wrong.
In my terminal I also got this error:
Could not open index.js in the editor.
To set up the editor integration, add something like REACT_EDITOR=atom to the .env.local file in your project folder and restart the development server. Learn more:
The problem is, i dont have a.env.local file in my project
On contributing guideline it's written that you have to:
Create a.env.development.local file at the root of the project. Add the following lines inside:
REACT_APP_CROWDIN_APIKEY = "" REACT_APP_CROWDIN_PROJECTID = ""
You'll need this in order to get the i18n system to work. Contact a dev if you need these values.
Install the dependencies
yarn yarn start
Note: If you don't have yarn
, run npm install -g yarn
.
I tried here locally and it works:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.