Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize arapp.json when creating from scratch #15

Open
marsrobertson opened this issue Apr 1, 2020 · 2 comments
Open

Initialize arapp.json when creating from scratch #15

marsrobertson opened this issue Apr 1, 2020 · 2 comments

Comments

@marsrobertson
Copy link

This is empty: https://github.com/aragon/your-first-aragon-app/blob/master/arapp.json

npm start complains about empty JSON

npm start

> placeholder-app-name@0.0.1 start /Users/ms/Stuff/aragon-tutorial
> buidler start

main     | Starting Aragon app development...
An unexpected error occurred:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at readArapp (/Users/ms/Stuff/aragon-tutorial/node_modules/@aragon/buidler-aragon/src/utils/arappUtils.ts:15:15)
    at Object.getAppEnsName (/Users/ms/Stuff/aragon-tutorial/node_modules/@aragon/buidler-aragon/src/utils/arappUtils.ts:23:17)
    at SimpleTaskDefinition.config_1.task.addFlag.addFlag.setAction [as action] (/Users/ms/Stuff/aragon-tutorial/node_modules/@aragon/buidler-aragon/src/tasks/start-task.ts:34:30)
    at Environment._runTaskDefinition (/Users/ms/Stuff/aragon-tutorial/node_modules/@nomiclabs/buidler/src/internal/core/runtime-environment.ts:190:35)
    at Environment.run (/Users/ms/Stuff/aragon-tutorial/node_modules/@nomiclabs/buidler/src/internal/core/runtime-environment.ts:115:17)
    at main (/Users/ms/Stuff/aragon-tutorial/node_modules/@nomiclabs/buidler/src/internal/cli/cli.ts:151:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! placeholder-app-name@0.0.1 start: `buidler start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the placeholder-app-name@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ms/.npm/_logs/2020-04-01T13_44_00_046Z-debug.log
/**
 * Reads and parses an arapp.json file.
 * @return AragonAppJson
 */
export function readArapp(): AragonAppJson {
  return JSON.parse(fs.readFileSync(arappPath, 'utf-8'))
}
@marsrobertson
Copy link
Author

@macor161
Copy link
Contributor

macor161 commented Apr 1, 2020

Hi @marsrobertson, yes this is quite a common question. As explained here, the boilerplate code intentionally has empty files like CounterApp.sol and arapp.json.

However, it does lead to some confusion for many users to begin with a project which has a broken npm start command. Perhaps it would be more intuitive to start with all the basic files that the developer can then complete throughout the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants