actualbudget / import-ynab5

A tool for importing YNAB5 (nYNAB) data into Actual
26 stars 14 forks source link

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

Closed loftydan closed 2 years ago

loftydan commented 2 years ago

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 commented 2 years ago

Same problem here.

loftydan commented 2 years ago

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 commented 2 years ago

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