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

PSAT CLI tool with message after update to 0.8.0 version #677

Open
Joeyindigital opened this issue May 15, 2024 · 5 comments
Open

PSAT CLI tool with message after update to 0.8.0 version #677

Joeyindigital opened this issue May 15, 2024 · 5 comments
Assignees
Labels
bug Something isn't working CLI support
Milestone

Comments

@Joeyindigital
Copy link

just update the new version of cli psat tool. While I run npm cli run -- -u https://bbc.com -ab, this message appears.
"Please provide one and only one of the following
a) URL of a site (-u or --url)
b) URL of a sitemap (-s or --sitemap-url)
c) Path to a CSV file (-c or --csv-path)
d) Path to an XML file (-p or --sitemap-path)"
Any reason why this is happening after the updates?

image

@gagan0123 gagan0123 changed the title Psat cli tool with message after update to 0.8.0 version PSAT CLI tool with message after update to 0.8.0 version May 15, 2024
@milindmore22
Copy link
Collaborator

Hello @Joeyindigital

Thank you for reaching out to us, we checked your screenshots and found that the output you provided shows
> node dist/cli/index.js https://bbc.com/, but it should ideally be > node dist/cli/index.js -u https://bbc.com/ -ab.

Unfortunately, we couldn’t replicate the issue on our end, so we’re not entirely sure what caused it.

image

To diagnose the issue further, please share some additional information?

  1. Operating System (OS) and Version: This helps us understand if there might be any OS-specific quirks affecting the CLI options.
  2. PowerShell Version : You can find instructions on how to check the PowerShell version using this helpful guide: How to Check the PowerShell Version in Windows 10
  3. Node Version: You can check your Node.js version by running the command node -v in your terminal.

Meanwhile, here are some general suggestions that might help:

  • Reinstall and rebuild the project by running:

    • npm i
    • npm run cli:build
  • After the rebuild, run the command for analysis again using:

    • npm run cli -- -u https://bbc.com/ -ab
  • If the CLI options are still missing in the output, try using the alternative CLI options:

    • npm run cli -- --url https://bbc.com/ --accept-banner

We hope this helps! Please let us know if you have any other questions.

@Joeyindigital
Copy link
Author

I have reinstalled the package and still shows the same issue.
(I used node v22.1.0 with psat cli 0.8.0 with windows 11)
image

image

@Joeyindigital
Copy link
Author

And I tested it on command prompt, I received this error.
image
"node:internal/child_process:421
throw new ErrnoException(err, 'spawn');
^

Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:760:9)
at C:\Users\JoeyHsin-YinHou(OMG)\ps-analysis-tool\dist\cli\index.js:71:31
at Generator.next ()
at C:\Users\JoeyHsin-YinHou(OMG)\ps-analysis-tool\dist\cli\index.js:8:71
at new Promise ()
at __awaiter (C:\Users\JoeyHsin-YinHou(OMG)\ps-analysis-tool\dist\cli\index.js:4:12)
at startDashboardServer (C:\Users\JoeyHsin-YinHou(OMG)\ps-analysis-tool\dist\cli\index.js:70:45)
at C:\Users\JoeyHsin-YinHou(OMG)\ps-analysis-tool\dist\cli\index.js:172:5
at Generator.next () {
errno: -4071,
code: 'EINVAL',
syscall: 'spawn'
}"

@milindmore22
Copy link
Collaborator

milindmore22 commented May 16, 2024

Hello @Joeyindigital

Thank you for sharing the details, we tried Node.js v22.1.0 and encountered a similar bug.

image (1)

While we’re working on a fix, we recommend switching to Node.js version v18.1 for now.

Screenshot_win11_2024-05-16_15_05_10

You can easily install and switch between different Node.js versions using nvm. This article provides a helpful guide.

@milindmore22 milindmore22 added bug Something isn't working CLI labels May 16, 2024
@maitreyie-chavan maitreyie-chavan added this to the v1.0.0 milestone May 17, 2024
@milindmore22
Copy link
Collaborator

Hello @Joeyindigital

I'm checking in to see if you've been able to use the PSAT CLI after switching to Node.js version 18.1.

Please reach out to me if you experience any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI support
Projects
Status: Todo
Development

No branches or pull requests

4 participants