antiboredom / p5.vscode

A VS Code extension to generate new p5.js project files.
Other
55 stars 15 forks source link

Could not read source map #12

Closed joerhang1365 closed 3 years ago

joerhang1365 commented 3 years ago

I'm trying to run a web browser game I put together and while I was debugging I get the error

Could not read source map for http://localhost:5500/libraries/p5.sound.min.js: Unexpected 404 response from http://localhost:5500/libraries/p5.sound.min.js.map

Is this a problem and if so how do I fix it?

antiboredom commented 3 years ago

hi - can you send me your project files so I can test something? Also what operating system are you using?

antiboredom commented 3 years ago

@Joer1365 closing this for now since I can't replicate the issue locally. If you continue to have issues please do let me know.

joerhang1365 commented 3 years ago

Thanks for replying. The issue has not stopped. When ever I debug my code in Visual Studios the message, "Could not read source map for http://localhost:5500/libraries/p5.sound.min.js: Unexpected 404 response from http://localhost:5500/libraries/p5.sound.min.js.map," randomly appears. It hasn't done this until recently and I wonder if I made a typo or typed a letter into the libraries by mistake? If anyone else has this problem and has fixed it please let me know.

antiboredom commented 3 years ago

Ah - I see it now. I'm using the minified version of the sound library which seems to be causing the issue. There are 3 options to fix this on your end while I sort this out:

  1. If you are not using the sound library in your project, you can just remove line 12 of index.html which references p5.sound.min.js
  2. Replace the minified version of sound with it with the un-minified version
  3. Put p5.sound.min.js.map in your project libraries folder

Any of these should fix the issue!