jsonschema icon indicating copy to clipboard operation
jsonschema copied to clipboard

Cannot find module 'url'

Open mamadfar opened this issue 2 years ago • 6 comments

After I deploy my project ( react => v17 ), when I try to move that page which I used jsonschema, I get this error "Cannot find module 'url'". For fixed this I had to install url package manually in the project. But this is a temporary way. Can you fix this ?

mamadfar avatar Jul 02 '22 04:07 mamadfar

请考虑一下不在node环境,如果说只能运行在node环境,请在文档里标名。

xbw19975 avatar Jul 03 '22 11:07 xbw19975

Same here: Had to add "url" to my packages, and then in the code where i use it I had to import as well before calling the validation (import * as url from "url"). Otherwise the validation throws an error that urilib.resolve is not a method

geotom avatar Jul 15 '22 08:07 geotom

Same, it seems the lib was designed with only Node in mind. If you are in the browser, you will need to install "url" from npm to have the url.resolve function. I don't know why it broke recently, I guess "url" was installed by another dependency.

AlexPernot avatar Oct 12 '22 07:10 AlexPernot