I'm trying to use Truffle to test some contracts by following their docs. As specified, I have installed truffle, testrpc, created the migration contract and worked fine.
Ran truffle compile
$ truffle compile
Compiling ./contracts/User1.sol...
Compiling ./contracts/User2.sol...
Compiling ./contracts/Registry.sol...
Writing artifacts to ./build/contracts
and truffle migrate
$ truffle migrate
Using network 'development'.
Network up to date.
and both seemed ok.
The problem was running trying to interact with a contract using truffe console
$ truffle console
Unexpected error: Cannot provision contracts while instantiating the console.
: Unexpected end of JSON input
at /usr/local/lib/node_modules/truffle/build/cli.bundled.js:213724:27
at tryToString (fs.js:456:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:443:12)
truffle(development)> User1.deployed()
ReferenceError: User1 is not defined
If it helps, the structure of the dir is
├── build
│ ├── Icon\r
│ └── contracts
│ ├── ConvertLib.json
│ ├── User1.json
│ ├── Icon\r
│ ├── MetaCoin.json
│ ├── Migrations.json
│ ├── User2.json
│ ├── Registry.json
│ ├── Storage.json
├── contracts
│ ├── User1.sol
│ ├── Migrations.sol
│ ├── User2.sol
│ ├── Registry.sol
├── migrations
│ ├── 1_initial_migration.js
│ ├── 2_user1_migration.sol
│ ├── 3_user2_migration.sol
│ ├── 4_registry_migration.sol
│ └── Icon\r
├── test
│ ├── Icon\r
│ ├── TestMetacoin.sol
│ └── metacoin.js
└── truffle.js
How can I fix this?