-
Notifications
You must be signed in to change notification settings - Fork 14
node index.js Error reading file #15
Comments
Hey @kazzazed! It sounds like the importer is unable to find the file at the specified path. Since the file ( node index.js ./budget.json Please note the Hope this helps! |
@ashraymehta , thanks for responding. [user@laptop]:/mnt/c/Temp/import-ynab5-master$ node index.js ./budget.json also tried specifying full path: C:\Temp\import-ynab5-master>bash |
Hey @kazzazed. I tried it on my Windows PC and I faced the same issue as you when I ran it from WSL ( The command from Powershell would be the same one I posted above: Please note that I did not enter Hope this sorts it out for you! |
@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 😃 |
I added a note about WSL a little while ago. Thanks for the help @ashraymehta ! |
I'm not a developer so stumbling around a little with this.. can anyone assist me with this error? I've got nodejs installed running latest version, and updated npm. I downloaded the zip file and extracted it to c:\temp, so the files are in c:\temp\import-ynab5-master. From that path I ran npm i in bash to install the libraries.
Then with Actual running, in command prompt, I cd to that directory and run node index.js /budget.json and get 'Error Reading File'. I get the same error if I don't give a file name (node index.js). The budget file I downloaded is in the same directory, so not adding a path to that file name (have also tried putting in the full file path/name, same result).
I have set permissions on the folders to Everyone full access, as well as local machine users (needed to do that to write the file from ynab).
Is anyone able to assist me with this? is it a permissions issue? version issue?
Running W10 latest version.
WLS2
Default node v16.13.0 (have also installed 17.1.0 and running that get same issue)
npm version 8.1.3
Any assistance or pointers appreciated.
Directory of C:\Temp\import-ynab5-master
14/11/2021 06:17 PM
.14/11/2021 06:17 PM ..
14/11/2021 05:39 PM 12 .gitignore
14/11/2021 12:30 PM 2,106,753 budget.json
14/11/2021 05:39 PM 4,525 example.json
14/11/2021 05:39 PM 9,517 importer.js
14/11/2021 05:39 PM 179 index.js
14/11/2021 05:42 PM node_modules
14/11/2021 07:12 PM 5,222 package-lock.json
14/11/2021 05:39 PM 587 package.json
14/11/2021 05:39 PM 1,158 README.md
14/11/2021 07:12 PM 1,898 yarn.lock
9 File(s) 2,129,851 bytes
3 Dir(s) 148,388,691,968 bytes free
C:\Temp\import-ynab5-master>bash
[user@laptop]:/mnt/c/Temp/import-ynab5-master$ node index.js /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
[user@laptop]:/mnt/c/Temp/import-ynab5-master$
The text was updated successfully, but these errors were encountered: