achievements-app/psn-api

psn-api can't be found.

SMcGregor199 opened this issue · 2 comments

I want to use this api to display all my games in my browser's console. But for some reason, I'm getting a 404 error because the file "psn-api" can't be found.

things i've done

  • I've followed the installation instructions in the documentation ( npm install psn-api),
  • I've tried removing the "./" prefix

I'm attaching an image of my code below as well as the error I'm receiving. I'd appreciate it if someone could pinpoint what I'm doing wrong. I'm pretty new to APis in general. It might be something very simple that I'm overlooking. It might also be helpful to know that I'm not using a javascript-framework. I'm trying to fetch the data in a single .js file, and I'm using the file on an index page with <script type="module" src="scripts/psn-api.js"></script>
Screen_Shot_2022-10-10_at_1_14_45_PM-2

Screen Shot 2022-10-10 at 1 54 08 PM

Hi! Just skimming over the code, things look okay. Since the issue is a 404, it must be how you are specifically loading the JS file. I assume the file you are trying to access within node_modules is not accessible to the server.

psn-api is available via CDN. It might be worth a try with your setup: https://www.skypack.dev/view/psn-api

@SMcGregor199 As this is more closely related to project configuration, I will be closing this issue for now! Please LMK if there are issues with Skypack CDN, and if so maybe we can take things to Stackblitz and come to a resolution.