Import inferencejs to perform inference on images on local server

Hello. I am working on creating a website for editing images and the part I’m having trouble is performing instance segmentation on the image. I tried to follow the guidance from this website: Web Browser | Roboflow Docs.
However, when I implement it, this error pops up: Uncaught TypeError: The specifier “inferencejs” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “…/” or “/”.
the source map i added from the website is also giving an error: Source map error: Error: URL constructor: is not a valid URL.
Resource URL: wasm:https://cdn.jsdelivr.net/npm/inferencejs%20line%2088%20>%20WebAssembly.Module
Source Map URL: null

Project Type: Instance segmentation
Operating System & Browser: Windows, Chrome, Firefox