I keep getting this error after in terminal when importing logo; the logo is importing though not sure why. There isn't much support regarding this error online on here as well as on next js if anyone has come across this and can help much appreciated
<Image src={'/../public/logo.svg'} width={width} height={height} />;
It wont run without the / in the beginning.
You are trying to ask for /../public/logo.svg which starts at the root, tries to go a level above the root, and then down to public/logo.svg.
Since the client isn't allowed to go above the root (and access arbitrary files on the server!), the ../ gets stripped out (with the security error you see) and the browser is given the resulting URL.
The SVG is displayed because after recovering from the error, the URL happened to point to the SVG.
To get rid of the error message, stop making the error. Remove ../ from the URL.
import icon from react component instead*
const Logo = ({ width, height }) => {
return (
<svg
</svg>
);
};
export default Logo;
import Logo into components