isomorphic-dompurify icon indicating copy to clipboard operation
isomorphic-dompurify copied to clipboard

use umijs ssr error

Open crazyair opened this issue 3 years ago • 4 comments

https://github.com/umijs/umi/issues/5732


Updated by a maintainer:

A related issue: https://github.com/jsdom/jsdom/issues/3042

crazyair avatar Nov 25 '20 06:11 crazyair

Thanks for reporting @crazyair Will investigate.

kkomelin avatar Nov 25 '20 18:11 kkomelin

install canvas

 ERROR  Failed to compile with 1 errors                                                                                                                                              10:08:39 AM

 error  in ./node_modules/canvas/build/Release/canvas.node

Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
``

crazyair avatar Nov 26 '20 02:11 crazyair

Hi, I created a PR to fix that issue (JSDOM only has canvas as a peerDependency, which means that it relies on you installing it). https://github.com/kkomelin/isomorphic-dompurify/pull/36

DeviousM avatar Dec 02 '20 09:12 DeviousM

Hi, I created a PR to fix that issue (JSDOM only has canvas as a peerDependency, which means that it relies on you installing it). #36

Now, can the UMI project be used? Can others be used?

crazyair avatar Jan 28 '21 10:01 crazyair