# App.js and Syntax Error

**URL:** <https://forum.scrt.network/t/app-js-and-syntax-error/1090>\
**Category:** Secret Contracts and Secret Apps\
**Created:** [September 11, 2019, 10:12am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090 "2019-09-11T10:12:52Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [September 11, 2019, 10:12am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/1 "2019-09-11T10:12:53Z")

</div>

I follow the [Getting Started](https://enigma.co/protocol/GettingStarted.html) 、 [Writing a Secret Contract](https://enigma.co/protocol/SecretContracts.html) 、 [Creating a React Front-End](https://enigma.co/protocol/CreateReactFrontend.html) , but I get this Syntax Error about _enigma\_dapp/client/src/App.js_ , I copy the [Creating a React Front-End](https://enigma.co/protocol/CreateReactFrontend.html) said App.js , Error follow the pictures

 ![10550711447793](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/1X/acae9a6979fef58f0755f4421ce94c37958eb70c.png)

 ![10550715891778](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/1X/08b976c2c7f71425013dfca81c22ff53143559c0.png)

* * *

if I didn’t add [Writing a Secret Contract](https://enigma.co/protocol/SecretContracts.html) 、 [Creating a React Front-End](https://enigma.co/protocol/CreateReactFrontend.html) part

I get “Enigma setup still loading”

 ![10550885904564](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/1X/1567f91a4f7f28c11f983de1de612cd2d765df34.png)

I’m sure the /enigma\_dapp/ have package.json  
and /enigma\_dapp/client/ have package.json 、 package-lock.json 、 yarn.lock

but /enigma\_dapp/client/src don’t have any of them , how can I fix the problem?

---

<div class="post-metadata">

**Author:** ![arookie](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arookie/32/845_2.png) [@arookie](https://forum.scrt.network/u/arookie)\
**Post date:** [September 11, 2019, 2:58pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/2 "2019-09-11T14:58:03Z")

</div>

hey @ARsakura the docs which you refer maybe a very-early version of Enigma (still using Solidity for contract development).

At the moment, you can follow 3 walkthrough parts [here](https://blog.enigma.co/developers/home).

The testnet (called `discovery-cli`) now is easier to setup. Of course you need to install [Prerequisites](https://github.com/enigmampc/discovery-cli#requirements) before starting development.

Just try again and let us know the result.

---

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [September 12, 2019, 1:22pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/3 "2019-09-12T13:22:18Z")

</div>

Okay , but both(this version and “discovery-cli”) are tested before , i show this error because the version have response , I will post the “discovery-cli” error message next post.

Thank you , arookie.

---

<div class="post-metadata">

**Author:** ![victor](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/victor/32/91_2.png) [@victor](https://forum.scrt.network/u/victor)\
**Post date:** [September 16, 2019, 7:50pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/4 "2019-09-16T19:50:33Z")

</div>

@ARsakura, looking at the error itself, it says there is an error with your file at `/home/ar/enigma/enigma_dapp/package.json`.

Can you post the contents of this file on this thread, so that we can identify what’s wrong with it?

---

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [September 17, 2019, 9:00am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/5 "2019-09-17T09:00:53Z")

</div>

Hi , victor：

/home/ar/enigma/enigma\_dapp/package.json

The file’s content as follow：

{  
“name”: “enigma-contract”,  
“version”: “0.0.1”,  
“description”: “The Solidity contracts of the Enigma Protocol with a Truffle test bed.”,  
“repository”: {  
“type”: “git”,  
“url”: “git+https://github.com/enigmampc/enigma-contract.git”  
},  
“keywords”: ,  
“author”: “Enigma”,  
“license”: “MIT”,  
“bugs”: {  
“url”: “[https://github.com/enigmampc/enigma-contract/issues](https://github.com/enigmampc/enigma-contract/issues)”  
},  
“homepage”: “[https://enigma.co](https://enigma.co)”,  
“dependencies”: {  
“bluebird”: “^3.5.1”,  
“lodash”: “^4.17.10”,  
“bn.js”: “^4.11.8”  
},  
“devDependencies”: {  
“buffer”: “^5.1.0”,  
“babel-polyfill”: “^6.26.0”,  
“babel-preset-env”: “^1.7.0”,  
“babel-register”: “^6.26.0”,  
“elliptic”: “6.4.0”,  
“eth-crypto”: “^1.2.2”,  
“ethereumjs-abi”: “^0.6.5”,  
“node-forge”: “^0.7.5”,  
“truffle-contract”: “^3.0.6”,  
“web3”: “^1.0.0-beta.34”,  
“web3-utils”: “1.0.0-beta.34”,  
“rlp”: “2.1.0”,  
“openzeppelin-solidity”: “^1.11.0”  
}  
}

---

<div class="post-metadata">

**Author:** ![taariq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/taariq/32/291_2.png) [@taariq](https://forum.scrt.network/u/taariq)\
**Post date:** [September 18, 2019, 3:50am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/6 "2019-09-18T03:50:45Z")

</div>

> [@ARsakura](#):
>
> {  
> “name”: “enigma-contract”,  
> “version”: “0.0.1”,  
> “description”: “The Solidity contracts of the Enigma Protocol with a Truffle test bed.”,  
> “repository”: {  
> “type”: “git”,  
> “url”: “git+https://github.com/enigmampc/enigma-contract.git”  
> },  
> “keywords”: ,  
> “author”: “Enigma”,  
> “license”: “MIT”,  
> “bugs”: {  
> “url”: “[https://github.com/enigmampc/enigma-contract/issues”](https://github.com/enigmampc/enigma-contract/issues%E2%80%9D)  
> },  
> “homepage”: “[https://enigma.co](https://enigma.co)”,  
> “dependencies”: {  
> “bluebird”: “^3.5.1”,  
> “lodash”: “^4.17.10”,  
> “bn.js”: “^4.11.8”  
> },  
> “devDependencies”: {  
> “buffer”: “^5.1.0”,  
> “babel-polyfill”: “^6.26.0”,  
> “babel-preset-env”: “^1.7.0”,  
> “babel-register”: “^6.26.0”,  
> “elliptic”: “6.4.0”,  
> “eth-crypto”: “^1.2.2”,  
> “ethereumjs-abi”: “^0.6.5”,  
> “node-forge”: “^0.7.5”,  
> “truffle-contract”: “^3.0.6”,  
> “web3”: “^1.0.0-beta.34”,  
> “web3-utils”: “1.0.0-beta.34”,  
> “rlp”: “2.1.0”,  
> “openzeppelin-solidity”: “^1.11.0”  
> }  
> }

There’s no value for “keywords”  
Did you hand code this or copy it from one of the samples?

---

<div class="post-metadata">

**Author:** ![taariq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/taariq/32/291_2.png) [@taariq](https://forum.scrt.network/u/taariq)\
**Post date:** [September 18, 2019, 7:58am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/7 "2019-09-18T07:58:48Z")

</div>

Maybe it’s just the formatter here, or when you copied from elsewhere, guess it used to be `[]`

You can try fixing or removing keywords, see if that helps or there’s another error, then paste the json here using the “Preformatted text” if you didn’t already.

---

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [September 22, 2019, 8:30am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/8 "2019-09-22T08:30:50Z")

</div>

Thank you , I install it by standard procedure , so I … probably not change somewhere but I don’t know.

Appreciating your comment , thank you …!

---

<div class="post-metadata">

**Author:** ![taariq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/taariq/32/291_2.png) [@taariq](https://forum.scrt.network/u/taariq)\
**Post date:** [September 22, 2019, 2:24pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/9 "2019-09-22T14:24:42Z")

</div>

Strange, but at least then it should be reproducible.  
If so please push your project to github with the steps you took then I’ll try reproduce it on my system too.

---

<div class="post-metadata">

**Author:** ![victor](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/victor/32/91_2.png) [@victor](https://forum.scrt.network/u/victor)\
**Post date:** [September 23, 2019, 6:22pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/10 "2019-09-23T18:22:26Z")

</div>

@ARsakura,

checking in here: has your problem been fixed? as @taariq points out, there is something wrong in your `package.json` file around the `keywords` section. It should look like this one: [https://github.com/enigmampc/enigma-template-dapp/blob/9d88c815827bf14033ffef0083c1c76f049835b3/package.json#L9](https://github.com/enigmampc/enigma-template-dapp/blob/9d88c815827bf14033ffef0083c1c76f049835b3/package.json#L9)

Can you double check, or copy it over again? and make sure that line equals this:

```auto
"keywords": []

```

Kindly let us know if this resolves your problem.

---

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [September 26, 2019, 8:35am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/11 "2019-09-26T08:35:59Z")

</div>

1.This is one of computer’s result ( it always get wrong )

Yes , My original document is：

`"keywords": [] ,`

I didn’t notice the last post is a square , sorry.  
and I delete the `[]` , now is：

`"keywords": ,`

I follow the @taariq 's way and restart again.(computer restart , too)

and I got these errors.

I launch the enigma\_network by `sudo ./launch.bash -t -s`

and … I usually used `npx react-scripts start`

because `npm run start` didn’t work , as follow：

 ![10635244442298](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/1X/107e2595d32ccb636c90e8fbb72cdf2f7f7bf332.jpeg)  
Left is enigma\_dapp / Right is enigma\_network

than I use the `npx react-scripts start` , as follow：

 ![10635261993638](https://canada1.discourse-cdn.com/flex035/uploads/enigma1/original/1X/34afa2234269f956e47f6f08911bfd3cb289e156.jpeg)  
Left is enigma\_dapp / Right is enigma\_network

`---------------------------------------------------------------------------------------------------------`

2.Another computer is last one’s (the first post’s one) , I follow the @taariq 's way , and get the web：

Enigma Template DApp  
Enigma Setup still loading…

Nothing happend (including million problem contract not showing or something)

`---------------------------------------------------------------------------------------------------------`

I didn’t expect developer will reply my problem (Original situation) , and I not sure will keep this more far , it took me the whole 2 month for building it , and I won’t keep it.

Probaly I will try discovery version , I just think it really ,always problems a lot for me , It wastes too much time.

---

<div class="post-metadata">

**Author:** ![taariq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/taariq/32/291_2.png) [@taariq](https://forum.scrt.network/u/taariq)\
**Post date:** [September 27, 2019, 4:18am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/12 "2019-09-27T04:18:54Z")

</div>

Sorry you faced this but the repo was deprecated, so it would be great if you could try discovery instead.  
You’ll find it’s a much better development experience and if you have any issues we can work through it in the latest version.

---

<div class="post-metadata">

**Author:** ![ainsley](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/ainsley/32/73_2.png) [@ainsley](https://forum.scrt.network/u/ainsley)\
**Post date:** [October 1, 2019, 5:42pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/13 "2019-10-01T17:42:33Z")

</div>

Hey @ARsakura – let us know if you’re able to try this out in the non-deprecated version. We hope it’s a better experience.

---

<div class="post-metadata">

**Author:** ![ARsakura](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/arsakura/32/314_2.png) [@ARsakura](https://forum.scrt.network/u/ARsakura)\
**Post date:** [October 3, 2019, 10:55am UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/14 "2019-10-03T10:55:03Z")

</div>

@ainsley These days I will test it again , Sorry for replying late , Thank you again .

---

<div class="post-metadata">

**Author:** ![ainsley](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/ainsley/32/73_2.png) [@ainsley](https://forum.scrt.network/u/ainsley)\
**Post date:** [October 3, 2019, 9:22pm UTC](https://forum.scrt.network/t/app-js-and-syntax-error/1090/15 "2019-10-03T21:22:45Z")

</div>

Thanks @ARsakura, looking forward to any updates from you 🙂
