Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run abridge fails on windows #160

Open
Brandon689 opened this issue Jan 9, 2024 · 9 comments
Open

npm run abridge fails on windows #160

Brandon689 opened this issue Jan 9, 2024 · 9 comments
Labels

Comments

@Brandon689
Copy link

node:internal/errors:497
ErrorCaptureStackTrace(err);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at Object.writeFileSync (node:fs:2281:5)
at minify (C:\blog\free\package_abridge.js:275:6)
at abridge (C:\blog\free\package_abridge.js:184:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_ARG_TYPE'
}

man this theme is so insanely brittle

@Jieiku
Copy link
Owner

Jieiku commented Jan 9, 2024

Believe me, I would love to avoid using npm/node, it is only used to make up for the shortcomings in Zola, like being unable to template a js file.

The message in that error is not very specific but I am thinking I can just add some error and type checking in the node script. Will push an update shortly, thank you for reporting this issue.

@Jieiku
Copy link
Owner

Jieiku commented Jan 9, 2024

Just pushed a commit that adds a lot of error handling.

Update your abridge theme / submodule and let me know what error if any that you get now.

Thank You for submitting this report, it really helps to improve abridge!

@Jieiku
Copy link
Owner

Jieiku commented Jan 9, 2024

I just added one more error catch, in the case of a missing config.toml: ce93f9a

I am not seeing anything else to error check on, so hopefully now it will give more meaningful error messages.

@Brandon689
Copy link
Author

it doesnt change the error message

@Brandon689
Copy link
Author

Brandon689 commented Jan 10, 2024

its because of Windows somehow, I dont have this issue on Linux. The whole timeline is I was fine, then the submodule way I used was bad cause I couldnt change the theme code. So I deleted the submodule the wrong way (this is all on my Manjaro laptop) and couldnt undo deleting it improperly.
So I redid whole setup on my Windows 11 pc and it just does not work.

So now ive gone back to Linux and redone it and of course I see no errors. So its likely not an easy thing to fix.

@Jieiku
Copy link
Owner

Jieiku commented Jan 10, 2024

ok, that is still helpful though. I think I will invest some time in documenting windows setup steps, it has been like 10+ years since I have used windows for anything other than gaming, so I am a bit out of touch with how some of this would even be done in windows.

You could try WSL (Windows subsystem for linux) on your windows machine in the mean time, if you would rather use that machine.

Documenting setup for native windows is on my radar, but it will be a bit before I have time to do it.

@Jieiku Jieiku added the windows label Jan 10, 2024
@Jieiku Jieiku changed the title npm run abridge fails npm run abridge fails on windows Jan 10, 2024
@Brandon689
Copy link
Author

Its something I run into more and more, I'd like to switch over to Linux fully but I use Visual Studio and love that IDE. I would save myself a lot of trouble if I used Linux as daily driver.

@Jieiku
Copy link
Owner

Jieiku commented Jan 11, 2024

I thought Visual Studio runs fine on linux?

edit: woops only visual studio code.

@Brandon689
Copy link
Author

Even now I just had another Linux moment. I've been trying to setup Celery and RabbitMQ for periodic tasks and after all this effort and errors I find out that Celery doesn't actually promise that they support Windows and they don't expect anyone to do it.

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

No branches or pull requests

2 participants