Export 'SVGRenderer' (imported as 'THREE') was not found in 'three'

I want to save my three.js scene as a SVG Format.

I found this jsfiddle where it works as I want it : Edit fiddle - JSFiddle - Code Playground

But when I try to implement this in my code I am getting following error:

export 'SVGRenderer' (imported as 'THREE') was not found in 'three'

Version :

    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "5.0.0",
    "three": "^0.138.3",

Assuming you are importing SVGRenderer in your app with an ES6 import statement, the THREE namespace is not required when creating the renderer. Meaning you have to use:

var rendererSVG = new SVGRenderer();

The import from the three package looks like so:

import { SVGRenderer } from 'three/examples/jsm/renderers/SVGRenderer.js';

Thank you, it worked