Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

TypeError: Cannot read properties of undefined (reading 'budget') #9

Closed
loftydan opened this issue Nov 9, 2021 · 3 comments
Closed

Comments

@loftydan
Copy link

loftydan commented Nov 9, 2021

I'm getting the following error when importing my exported .json file from ynab5.

node version is v17.0.1 for Windows.

TypeError: Cannot read properties of undefined (reading 'budget')
at importYNAB5 (C:\temp\import\importer.js:329:37)
    at run (C:\temp\import\index.js:6:9)
    at Object.<anonymous> (C:\temp\import\index.js:9:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
    at Module.load (node:internal/modules/cjs/loader:975: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
PS C:\temp\import>

I get the same error when importing on macOS, using the latest version installed through Brew.

import-ynab5 and my budget file are both located in C:\temp\import

@nayatiuh
Copy link

Same problem here.

@loftydan
Copy link
Author

I can confirm I get the same error with the latest version, 0.0.144 on both macOS and Windows and when using the new
npx method:
npx @actual-app/import-ynab5 /Users/dan/Downloads/nYNAB\ exports/Ynab\ Export.json
TypeError: Cannot read properties of undefined (reading 'budget')
at importYNAB5 (/Users/dan/.npm/_npx/4a8670296ef54906/node_modules/@actual-app/import-ynab5/importer.js:333:37)
at run (/Users/dan/.npm/_npx/4a8670296ef54906/node_modules/@actual-app/import-ynab5/index.js:6:9)
at Object. (/Users/dan/.npm/_npx/4a8670296ef54906/node_modules/@actual-app/import-ynab5/index.js:9:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975: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

jlongster added a commit that referenced this issue Nov 25, 2021
Handle JSON data with and without a nested "data" attribute (fixes #9)
@jlongster
Copy link
Contributor

Should be fixed! Try the npx @actual-app/import-ynab5 command again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants