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

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

Open
frallain opened this issue Nov 14, 2019 · 2 comments
Open

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

frallain opened this issue Nov 14, 2019 · 2 comments

Comments

@frallain
Copy link

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
Copy link
Contributor

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
Copy link
Author

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?

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