jcayzac
jcayzac23h ago

jsdom 27 wants to read the filesystem

I'm trying to update npm:jsdom from v23.x.x to 27.x.x. I'm now getting this error:
error: (in promise) NotCapable: Requires read access to "/Users/julien.cayzac/Library/Caches/deno/npm/registry.npmjs.org/jsdom/27.3.0/lib/jsdom/browser/default-stylesheet.css", run again with the --allow-read flag
error: (in promise) NotCapable: Requires read access to "/Users/julien.cayzac/Library/Caches/deno/npm/registry.npmjs.org/jsdom/27.3.0/lib/jsdom/browser/default-stylesheet.css", run again with the --allow-read flag
Is there a fix that doesn't involve giving access to the FS? I'm just parsing markup and want a DOM, why would I care about a stylesheet?
1 Reply
jcayzac
jcayzacOP19h ago
Maybe I should switch to parse5/hast-from-parse5/hast-util-select… Yup, it turned out pretty simple. Goodbye, jsdom!

Did you find this page helpful?