Cannot access "util.inspect" in client code. Sass Error

Viewed 18

Any ideas about this error? I have started experiancing this after npm upgrade. It is probably related to https://github.com/vitejs/vite/issues/9238

"nuxt": "^3.0.0-rc.10",
"node-sass": "^7.0.1",
"sass": "^1.54.5",
"sass-loader": "^10.2.1"
Module "util" has been externalized for browser compatibility. Cannot access "util.inspect" in client code.
get @ browser-external:util:9

Uncaught TypeError: Cannot read properties of undefined (reading 'custom')
    at Object.JSClassExtension_setCustomInspect (sass.dart.js:21478:51)
    at valueClass_closure.call$0 (sass.dart.js:98709:9)
    at sass.dart.js:101365:85
    at holder.<computed> [as $get$valueClass] (sass.dart.js:258:21)
    at Object.main (sass.dart.js:21099:37)
    at main1 (sass.dart.js:21819:9)
    at sass.dart.js:101473:7
    at sass.dart.js:101456:7
    at dartProgram (sass.dart.js:101467:3)
    at exports.load (sass.dart.js:101475:1)

1 Answers

Webstorm has autoimported import {Exception} from "sass"; without my knowleadge into frontend component and browser tried to load sass module which caused the error.

Related