aocrunner icon indicating copy to clipboard operation
aocrunner copied to clipboard

There is no "input.txt" file in the solution directory!

Open itaykatanov opened this issue 3 years ago • 10 comments

Same as issue #17 - Can't seems to make it work. I tried updating the version to 1.9.2 but it didn't work. Tried with node v16.18.1 and node v19.2.0 Working on macOS Monterey, Intel i5 processor.

Can you please have a look? thanks! 🙏🏼

itaykatanov avatar Dec 08 '22 15:12 itaykatanov

Current version is 1.9.5. What version are you running?

caderek avatar Dec 08 '22 15:12 caderek

I started with 1.9.5 and when it didn't work - I tried 1.9.2. Thanks for the quick reply!!

itaykatanov avatar Dec 08 '22 16:12 itaykatanov

Can you show how your project structure looks like? You can use tree -I node_modules -I dist in the project's folder for this (if you don't have this command, you can add it via brew install tree or equivalent if you use something other than brew).

caderek avatar Dec 08 '22 17:12 caderek

sure, here it is: image

itaykatanov avatar Dec 08 '22 17:12 itaykatanov

Thanks, looks good.

Could you edit the src/day1/index.js file and add the following line, as the first instruction in the part1 function:

console.log(new Error().stack)

Then please run yarn start 1 and paste the resulting stack trace, for me it looks something like this:

Error
    at part1 (file:///home/caderek/Projects/aoc2022/dist/day01/index.js:4:15)
    at runTests (file:///home/caderek/Projects/aoc2022/node_modules/aocrunner/lib/index.js:11:26)
    at runAsync (file:///home/caderek/Projects/aoc2022/node_modules/aocrunner/lib/index.js:53:11)
    at run (file:///home/caderek/Projects/aoc2022/node_modules/aocrunner/lib/index.js:136:3)
    at file:///home/caderek/Projects/aoc2022/dist/day01/index.js:28:1
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

It will help me debug what could go wrong with the path to the input file.

caderek avatar Dec 08 '22 17:12 caderek

Oh, sorry it wont work as the error occurs before it has a chance to run.

Please paste that line right after imports.

caderek avatar Dec 08 '22 17:12 caderek

image

Still getting the same error, it doesn't even get to run part1.. I suspect it fails when trying to resolve getDayData

itaykatanov avatar Dec 08 '22 17:12 itaykatanov

Yup, see my second comment.

caderek avatar Dec 08 '22 18:12 caderek

I may have found the issue..my project resided within a folder with a blank space ( ) in her name (i.e. my folder). The response of getFilesTrace encodes blank space to %20 (/User/my%20folder/aocrunner...), so apparently my machine doesn't recognize it, instead it only escapes blank space: my\ folder.

Not sure why this is, but I just remove the blank space from the folder name and it seems to be working..thanks!

See this: https://superuser.com/questions/981728/how-can-i-write-space-in-terminal-on-os-x

itaykatanov avatar Dec 09 '22 10:12 itaykatanov

Thanks, I will keep this open to see if I can prevent it from happening.

caderek avatar Dec 09 '22 19:12 caderek