-
|
Hey gang, We've recently launched our new Next.js site at https://egghead.io and are using Next.js and Tailwind. As you can imagine, our customers are eager for a dark mode. My problem is that turning on tailwind's dark mode results my dev source maps to fail with the following: Error! Failed to complete request to /_next/webpack-hmr?page=%2Fq%2F%5B%5B...all%5D%5D: Error: socket hang up
<--- Last few GCs --->
[90969:0x110008000] 84576 ms: Mark-sweep 2036.9 (2073.5) -> 2031.8 (2077.0) MB, 1961.0 / 0.0 ms (average mu = 0.071, current mu = 0.004) allocation failure scavenge might not succeed
[90969:0x110008000] 86544 ms: Mark-sweep 2040.5 (2077.0) -> 2035.0 (2087.7) MB, 1960.8 / 0.0 ms (average mu = 0.036, current mu = 0.003) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x1009d39b9]
1: StubFrame [pc: 0x1009d4a53]
Security context: 0x3c68ec9808d1 <JSObject>
2: SourceMapGenerator_serializeMappings [0x3c68f81bd9d1] [/Users/joel/Code/egghead/egghead-io-nextjs/node_modules/next/node_modules/css-loader/node_modules/source-map/lib/source-map-generator.js:~312] [pc=0x1dda6e48b40f](this=0x3c68c593fb51 <SourceMapGenerator map = 0x3c68fac4fcf9>)
3: SourceMapGenerator_toJSON [0x3c68...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x1011c2ff5 node::Abort() (.cold.1) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
2: 0x10009fbc9 node::Abort() [/Users/joel/.nodenv/versions/12.18.3/bin/node]
3: 0x10009fd2f node::OnFatalError(char const*, char const*) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
4: 0x1001e3907 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
5: 0x1001e38a7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
6: 0x1003695e5 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
7: 0x10036ae3a v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
8: 0x1003678be v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
9: 0x100365670 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
10: 0x10037149a v8::internal::Heap::AllocateRawWithLightRetry(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
11: 0x100371521 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
12: 0x10033f73a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
13: 0x10068e808 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/joel/.nodenv/versions/12.18.3/bin/node]
14: 0x1009d39b9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/joel/.nodenv/versions/12.18.3/bin/node]
15: 0x1009d4a53 Builtins_StringAdd_CheckNone [/Users/joel/.nodenv/versions/12.18.3/bin/node]
16: 0x1dda6e48b40f If I start my app with Tried My questions are: Can I configure the sourcemaps to more efficiently accomplish this? Is this a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Edit: For anyone coming from the future, this is now solved by Tailwind JIT! Left a comment on the Tailwind RFC to make sure we look at this! |
Beta Was this translation helpful? Give feedback.
Edit: For anyone coming from the future, this is now solved by Tailwind JIT!
Left a comment on the Tailwind RFC to make sure we look at this!
#20030 (comment)