Comments (10)
@VishnuJin upgrading to node v21.1.0 fixed the issue for me
from dart-sass.
Yeah. That's why I mentioned them here.
It scares me more that they haven't released a fix in 5 days.
from dart-sass.
Same here. Vite fails with:
[WebServer] Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'indexOf')
[WebServer] Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'pop')
[WebServer] 1:18:33 PM [vite] Internal server error: Preprocessor dependency "sass" failed to load:
#13 76.70 @contra/slate:build: [vite:css] Preprocessor dependency "sass" failed to load:
#13 76.70 @contra/slate:build: Cannot read properties of undefined (reading 'indexOf')
#13 76.70 @contra/slate:build: file: /srv/packages/slate/src/editor/components/Key/Key.module.scss?used
#13 76.70 @contra/slate:build: error during build:
#13 76.70 @contra/slate:build: TypeError: Cannot read properties of undefined (reading 'indexOf')
#13 76.70 @contra/slate:build: at /srv/node_modules/.pnpm/[email protected]/node_modules/sass/sass.dart.js:116798:12
Pasting in the error so Vite folks discover the thread when Google-ing it.
from dart-sass.
Since this seems to be fixed in Node 21.1, I'm closing it out.
from dart-sass.
Seems to be related to dart-lang/sdk#53784
from dart-sass.
I was thinking about that, but all occurrences of that other error mention indexOf
and there's no references to navigator
in this code. But still could be that, I'll definitely re-test it when that fix is in :)
from dart-sass.
facing the same with Vite, any workarounds other than downgrade of nodejs?
Unfortunately its the only work around
from dart-sass.
Can someone provide a minimal reproduction for this? I've tried manually editing sass.dart.js
to work around dart-lang/sdk#53784, but when I do so Dart Sass loads and runs fine in Node 21 for me (via both ESM and CJS loads). It seems to work through WebPack as well.
from dart-sass.
Getting this as well in the latest Next.js 13.5.6 pages directory.
stack:
../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[7].oneOf[9].use[1]!../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[7].oneOf[9].use[2]!../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/index.js??ruleSet[1].rules[7].oneOf[9].use[3]!../../node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/sass-loader/cjs.js??ruleSet[1].rules[7].oneOf[9].use[4]!./components/ui/ScrollArea.module.scss
./components/ui/ScrollArea.module.scss
./components/ui/ScrollArea.tsx
Appears its already fixed on dart-sass end
from dart-sass.
facing the same with Vite, any workarounds other than downgrade of nodejs?
from dart-sass.
Related Issues (20)
- [Feature Request] Ability to use @extend with :is HOT 1
- Unable to build on Alpine: so:libicuuc.so.74 (no such package) HOT 2
- Imports not resolving correctly when in nested path HOT 3
- i have a issues with dart-sass HOT 3
- Doesn't run on alpine linux HOT 6
- Using `math.random()` in css module leads to a wrongly generated class names HOT 1
- Bad state error when using `meta.apply` and compile with `render` HOT 2
- Unable to use meta.get-mixin to pass mixin as a value to another mixin, then use it in its content. HOT 3
- FileSpan is not defined when using @warn with a custom logger. HOT 1
- Anyway to wrap @use like we can with @import HOT 3
- Q&A: How can i fix waring import sass from 'sass'` is deprecated HOT 4
- Q&A: How to prevent color names being transformed to hex values HOT 2
- Dependency URLs with a `file` schema fail to resolve HOT 1
- Standalone sass compiler: Can't find stylesheet to import HOT 1
- [feature request] Official Python bindings to replace `libsass-python` HOT 3
- box-shadow property not respecting strict unary operator with 0
- linux-musl 1.71.0 release builds are broken
- ESM export of `NodePackageImporter` is missing.
- Node package importer requires an entryPointDirectory in ESM HOT 1
- Deprecation message replaces underscores with hyphens HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-sass.