> node_modules/domino/lib/sloppy.js:10:4: error: With statements cannot be used with the "esm" output format due to strict mode
10 │ with(this) eval(code);
╵ ~~~~
> node_modules/domino/lib/sloppy.js:14:6: error: With statements cannot be used with the "esm" output format due to strict mode
14 │ with(this.document.defaultView || Object.create(null))
╵ ~~~~
> node_modules/domino/lib/sloppy.js:15:8: error: With statements cannot be used with the "esm" output format due to strict mode
15 │ with(this.document)
╵ ~~~~
> node_modules/domino/lib/sloppy.js:16:10: error: With statements cannot be used with the "esm" output format due to strict mode
16 │ with(this.form)
╵ ~~~~
> node_modules/domino/lib/sloppy.js:17:12: error: With statements cannot be used with the "esm" output format due to strict mode
17 │ with(this.element)
╵ ~~~~
error when starting dev server:
Error: Build failed with 5 errors:
node_modules/domino/lib/sloppy.js:10:4: error: With statements cannot be used with the "esm" output format due to strict mode
node_modules/domino/lib/sloppy.js:14:6: error: With statements cannot be used with the "esm" output format due to strict mode
node_modules/domino/lib/sloppy.js:15:8: error: With statements cannot be used with the "esm" output format due to strict mode
node_modules/domino/lib/sloppy.js:16:10: error: With statements cannot be used with the "esm" output format due to strict mode
node_modules/domino/lib/sloppy.js:17:12: error: With statements cannot be used with the "esm" output format due to strict mode
at failureErrorWithLog (C:\Users\user\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:1224:15)
at buildResponseToResult (C:\Users\user\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:936:32)
at C:\Users\Leonhard Breuer\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:1035:20
at C:\Users\Leonhard Breuer\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:568:9
at handleIncomingPacket (C:\Users\user\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:657:9)
at Socket.readFromStdout (C:\Users\user\AppData\Roaming\npm\node_modules\vite\node_modules\esbuild\lib\main.js:535:7)
at Socket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
```
I get this error, how can I fix it?
same error Version: 7.1.1
I created the patch file:
diff --git a/node_modules/domino/lib/sloppy.js b/node_modules/domino/lib/sloppy.js
which I deploy to the server by adding “postinstall”: “patch-package”
as a package.json script.
This solved the problem for me.
@callmeberzerker @cheetahbyte Release
7.1has been created and published to npm registry. Would you mind to test it, especially withyarn?It should now be just:
Having the same problem
Hi @martincizek
I submitted PR https://github.com/mixmark-io/turndown/pull/457 just to share some results. I added benchmark and
happy-domis unfortunately a lot slower thandomino. I also added the html parserparse5briefly, but itsDocumentinterface doesn’t implement function likegetElementByID. It’s really only meant for parsing HTML into a list of nodes.Maybe there are other dies for parser that could be added to compare with
domino.EDIT: I added
jsdomfor comparison as well.There are some packaging changes in the master, so I’d like to ask you to try it first, i.e.:
If the issue is still present, please provide a minimum buildable example reproducing the issue. Including:
Thank you!