I'm getting an error as such:
Unhandled Runtime Error
TypeError: Cannot read properties of null (reading 'removeChild')
Call Stack
HTMLLinkElement.eval
node_modules/next/dist/compiled/mini-css-extract-plugin/hmr/hotModuleReplacement.js (1:1136)
This happens when I edit a SASS file, but the app gets hot-reloaded correctly and everything works fine. It's just the error is kinda bugging me. What could this possibly be?
Note that I'm currently using NextJS 13.
My full code here
layout.js
import "./globals.scss";
import { dmSans } from "./fonts";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
<div className={`${dmSans.variable}`}>{children}</div>
</body>
</html>
);
}
page.js
"use client";
import { useEffect } from "react";
import ShortDescription from "@/components/short-description";
import SelectedWork from "@/components/selected-work";
import RotatingText from "@/components/rotating-text";
import pguImage from "@/public/pgu.webp";
import adaroImage from "@/public/adaro.webp";
import petraImage from "@/public/petra.webp";
import styles from "./page.module.scss";
import { gsap } from "gsap";
export default function Home() {
useEffect(() => {
gsap.to("#hero > * > *", {
duration: 1,
y: 0,
opacity: 1,
stagger: 0.25,
ease: "power2",
});
}, []);
return (
<div id="main-container">
<header className={styles.header}>
<span className={styles.header__title}>OWENN GIMLI</span>
</header>
<div className={`${styles.hero} container`} id="hero">
<div>
<h4>\\ Personal portfolio</h4>
</div>
<div>
<h1>DATA SCIENCE,</h1>
</div>
<div>
<h1>WEB DEVELOPMENT</h1>
</div>
<div>
<h1>& DESIGN.</h1>
</div>
</div>
</div>
);
}

I don't have a solution I'm afraid, but am also experiencing this problem.. I've found this on my search: https://github.com/webpack-contrib/mini-css-extract-plugin/issues/682 which claims that a similar issue has been fixed.
My code also runs and uploads fine, and does not use
removeChildanywhere!Sorry I don't have a fix, I'll let you know if I do figure it out, but I just wanted to let you know you're not alone :)