App.js and Syntax Error

I follow the Getting StartedWriting a Secret ContractCreating a React Front-End , but I get this Syntax Error about enigma_dapp/client/src/App.js , I copy the Creating a React Front-End said App.js , Error follow the pictures


if I didn’t add Writing a Secret ContractCreating a React Front-End part

I get “Enigma setup still loading”

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?

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.

The testnet (called discovery-cli) now is easier to setup. Of course you need to install Prerequisites before starting development.

Just try again and let us know the result.

2 Likes

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.

1 Like

@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?

1 Like

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
},
“homepage”: “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?

1 Like

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.

1 Like

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

Appreciating your comment , thank you …!

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.