How to fix the “Could not read source map for file” error when trying to setup Tensorflow.js

If you are getting a “Could not read source map for file” error in the console when trying to link to a JavaScript library like Tensorflow, the solution is simple. You propably don’t need the source map anyways unless you are planning to really digging into the code base of the library. So simply:

  1. Open the script file in your code editor
  2. Scroll all the way down
  3. Remove the source map link at the bottom of the file

Leave a Reply

Your email address will not be published. Required fields are marked *