jsonschema
jsonschema copied to clipboard
Cannot find module 'url'
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 ?
请考虑一下不在node环境,如果说只能运行在node环境,请在文档里标名。
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
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.