cozy / ACH

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

ACH importDir : request to http://cozy.tools:8080/status/ failed #60

Open frallain opened 5 years ago

frallain commented 5 years ago

Hello again, I am now 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 importDir mydir/
Could not connect tohttp://cozy.tools:8080
FetchError: request to http://cozy.tools:8080/status/ failed, reason: connect ECONNREFUSED 127.0.0.1:8080
    at ClientRequest.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/node-fetch/index.js:133:11)
    at ClientRequest.emit (events.js:198:13)
    at Socket.socketErrorListener (_http_client.js:392:9)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Error: Could not create client
    at getClientFn.then.catch.err (/usr/local/share/.config/yarn/global/node_modules/cozy-ach/libs/getClient.js:161:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)

What did I do wrong?

ptbrowne commented 5 years ago

If you are trying to import data to a cozy hosted on mycozy.cloud you should use the --url flag (documented in the readme ;)).

-u --url [url] URL of the cozy to use. Defaults to "http://cozy.tools:8080".' (default: "http://cozy.tools:8080")

For example if you have the cozy francoisallain.mycozy.cloud, you should do:

ach importDir myDir/ --url https://francoisallain.mycozy.cloud
frallain commented 5 years ago

Thanks, so I tried

ACH importDir myDir/ --url https://frallain.mycozy.cloud

but then it hangs and nothing happens... How can I enable verbose mode?