Giter Club home page Giter Club logo

Comments (5)

kazzazed avatar kazzazed commented on June 20, 2024 1

@ashraymehta thank you! That worked perfectly. I was following the readme here on github which had everything running under WLS and using bash, so thought that I needed to do that. Did not realise I could execute js directly in W10. Thanks again 😃

from import-ynab5.

ashraymehta avatar ashraymehta commented on June 20, 2024

Hey @kazzazed! It sounds like the importer is unable to find the file at the specified path.

Since the file (budget.json) is in the same directory where you're running the command from, the command should probably be:

node index.js ./budget.json

Please note the . before the /budget.json, that's an important one.

Hope this helps!

from import-ynab5.

kazzazed avatar kazzazed commented on June 20, 2024

@ashraymehta , thanks for responding.
If I add the stop I get 'Couldn't connect to Actual' (which is running). I get that same error if I mistype the file name.
I have also tried specifying the full path, and also moving the budget file to another path and specifying that. Both cases I still get the error reading file.
I've tried running in command prompt, powershell in Administrator mode, and in Ubuntu 20.04 lts. All have the same result.
It's driving me nuts :(

[user@laptop]:/mnt/c/Temp/import-ynab5-master$ node index.js ./budget.json
Error: Couldn't connect to Actual. Please run the app first.
at init (/mnt/c/Temp/import-ynab5-master/node_modules/@actual-app/api/connection.js:44:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async _run (/mnt/c/Temp/import-ynab5-master/node_modules/@actual-app/api/connection.js:90:5)
at async run (/mnt/c/Temp/import-ynab5-master/index.js:6:3)
[user@laptop]:/mnt/c/Temp/import-ynab5-master$

also tried specifying full path:

C:\Temp\import-ynab5-master>bash
[user@laptop]:/mnt/c/Temp/import-ynab5-master$ node index.js /mnt/C/Temp/import-ynab5-master/budget.json
Error: Error reading file
at importYNAB5 (/mnt/c/Temp/import-ynab5-master/importer.js:319:11)
at run (/mnt/c/Temp/import-ynab5-master/index.js:6:9)
at Object. (/mnt/c/Temp/import-ynab5-master/index.js:9:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47

from import-ynab5.

ashraymehta avatar ashraymehta commented on June 20, 2024

Hey @kazzazed. I tried it on my Windows PC and I faced the same issue as you when I ran it from WSL (Couldn't connect to Actual. Please run the app first.). It seems that the importer can't connect to the Actual application from WSL. However, when I run it from Powershell (without WSL), it seems to work.

The command from Powershell would be the same one I posted above: node index.js ./budget.json.

Please note that I did not enter bash before running the command. It was from Powershell itself. This means that you'd have to install Node.js on Windows (https://nodejs.org/en/download/), if you don't have it already.

Hope this sorts it out for you!

from import-ynab5.

jlongster avatar jlongster commented on June 20, 2024

I added a note about WSL a little while ago. Thanks for the help @ashraymehta !

from import-ynab5.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.