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

Running config.json on sitespeed (via node CLI) #3920

Closed
Edson1337 opened this issue Jul 26, 2023 · 7 comments
Closed

Running config.json on sitespeed (via node CLI) #3920

Edson1337 opened this issue Jul 26, 2023 · 7 comments

Comments

@Edson1337
Copy link

Your question

Dear developers of sitespeed.io, I come to ask about the use of config.json for the command that runs through the node, locally on my machine. I have tried several ways to put the configuration I created, but the evaluation starts with the default configuration and ignores the json, or in other attempts I put the flag --config, is not considered correct, appears "TypeError [ERR_INVALID_URL_SCHEME]".

@soulgalore
Copy link
Member

Hi @Edson1337 can you share an exact example of how you run?

This works for me:
sitespeed.io --config config.json https://www.sitespeed.io

And the config.json looks like this:

{
    "browsertime": {
        "iterations": 1
    }
}

Here's the documentation: https://www.sitespeed.io/documentation/sitespeed.io/configuration/#configuration-as-json

@Edson1337
Copy link
Author

Edson1337 commented Jul 27, 2023

Hi @soulgalore, here is the configuration I am using for the test:

Captura de Tela (18)

Also, I use the same command line for execution and I get this error:

Captura de Tela (19)

One detail I did not mention in my question is that I am running on Windows 11.
If you can give me some insight on how to solve this, I would be grateful.

@soulgalore
Copy link
Member

Ah thank you @Edson1337 I wonder then if there's a bug in how we read the file on Windows, I added a test and will have a look.

@Edson1337
Copy link
Author

Edson1337 commented Jul 28, 2023

Thanks for adding the test, @soulgalore . I saw here that you mentioned this issue in the test you performed and that it generated the same error. So if there is a resolution to this issue, please let me know if possible.

I look forward to hearing from you and have a nice weekend.

@soulgalore
Copy link
Member

Hi @Edson1337 the error was introduced when I moved the code to ESM and I fixed it in #3921. I didn't had test for that on all platforms, but I added it now.

I'll release the fix later today (Sunday).

@soulgalore
Copy link
Member

@Edson1337 please try with 29.1.1 when you have time, I think it will work in that version.

@Edson1337
Copy link
Author

Hi @soulgalore , sorry I didn't reply sooner, but thank you very much for your help. I have already downloaded the new version and tested it with the settings I had made in the json file, I confirm the correct operation now.

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

No branches or pull requests

2 participants