cozy / ACH

Import/Export data from your Cozy
4 stars 5 forks source link

SyntaxError: Unexpected token i in JSON at position 0 #59

Closed frallain closed 5 years ago

frallain commented 5 years ago

Hello, I am trying to run ACH with

$ node --version
v10.16.3

$ yarn global add cozy-ach
yarn global v1.17.3
warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "cozy-ach > cozy-client-js@0.15.1" has unmet peer dependency "babel-polyfill@^6.26.0".
warning "cozy-ach > cozy-client@6.64.5" has unmet peer dependency "react@^16.7.0".
warning "cozy-ach > cozy-client > react-redux@5.1.2" has unmet peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
[4/4] Building fresh packages...
success Installed "cozy-ach@1.26.0" with binaries:
- ACH
Done in 14.72s.

$ ACH  import myfile.txt 
SyntaxError: Unexpected token i in JSON at position 0
    at JSON.parse (<anonymous>)
    at Command.program.command.description.action (/usr/local/share/.config/yarn/global/node_modules/cozy-ach/cli.js:58:39)
    at Command.listener (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/share/.config/yarn/global/node_modules/commander/index.js:474:21)
    at main (/usr/local/share/.config/yarn/global/node_modules/cozy-ach/cli.js:335:11)
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/cozy-ach/cli.js:352:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

What did I do wrong?

drazik commented 5 years ago

Hello. What's the content of myfile.txt? It should be a file containing JSON.

ptbrowne commented 5 years ago

You can see an example of such file here: https://github.com/cozy/ACH#import-data

frallain commented 5 years ago

Alright, I should have read better... Thanks