Skip to content

[Search npm Packages] Could Not Fetch Packages Error #21972

Closed

Description

@Lermatroid

Extension

https://www.raycast.com/mrmartineau/search-npm

Raycast Version

1.103.2

macOS Version

26.0.1

Description

Whenever I search a package it shows the error "Could Not Fetch Packages Error". This occurs no matter what package I search. I have tried un and reinstalling the package however that has not fixed the error.

Image

Steps To Reproduce

  1. Install the package
  2. Search for any package name
  3. Error is shown

Current Behaviour

Error is shown instead of the packages

Expected Behaviour

Show the packages

Activity

  1. added
    bug
    extension
    on Oct 5, 2025
  2. raycastbot commented on Oct 5, 2025

    @raycastbot
    Collaborator

    Thank you for opening this issue!

    🔔 @mrmartineau @reloadedhead @TimonVS @luisFilipePT @LunaticMuch @jomifepe @j3lte @LitoMore @ridemountainpig @DarrylBrooks97 you might want to have a look.

    💡 Author and Contributors commands

    The author and contributors of mrmartineau/search-npm can trigger bot actions by commenting:

    • @raycastbot close this issue Closes the issue.
    • @raycastbot close as not planned Closes the issue as not planned.
    • @raycastbot rename this issue to "Awesome new title" Renames the issue.
    • @raycastbot reopen this issue Reopens the issue.
    • @raycastbot assign me Assigns yourself to the issue.
    • @raycastbot good first issue Adds the "Good first issue" label to the issue.
    • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.
  3. added
    extension: search-npm
    on Oct 5, 2025
  4. TimShilov commented on Oct 13, 2025

    @TimShilov
    Contributor

    I'm having the same issue for a few weeks now.
    I've tried digging it a bit and here's what I've found.

    Below is the error logged.

    Error: Forbidden
        at Object.defaultParsing [as current] (/Users/tim.shilov/.config/raycast/extensions/search-npm/index.js:4070:15)
        at /Users/tim.shilov/.config/raycast/extensions/search-npm/index.js:4109:47
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    

    It seems like the extension is using https://www.npmjs.com/search/suggestions?q= URL to search, which is the same one that is used on NPM page itself.
    However, I don't believe that URL is a public API (at least I couldn't find any documentation for it).
    Also, on the NPM itself, that request now includes the x-csrf-token header, which explains Forbidden response, and leads me to believe that extension can no longer use it.


    Looking some more, I have found that NPM has a public registry API which can potentially be used.
    I gave it a quick try and it does work, but I couldn't make it work with the extension (yet).

    curl 'https://registry.npmjs.org/-/v1/search?text=snowflake'

    Not sure if I'll have time to make a patch anytime soon, so hopefully that can help anyone else to make one. 🤞

  5. added a commit that references this issue on Oct 13, 2025
  6. j3lte commented on Oct 13, 2025

    @j3lte
    Contributor

    @TimShilov I looked at your suggested fix, can confirm it works. I have implemented it in the lastest PR (see above), waiting for a review and merge

  7. added a commit that references this issue on Oct 14, 2025
  8. j3lte commented on Oct 14, 2025

    @j3lte
    Contributor

    Fixed and merged.

    @raycastbot close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextensionextension: search-npm

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions