I need to complete this exercise:
https://codelabs.developers.google.com/codelabs/mdc-102-web#2
But after all of these steps I get an error:
PS C:\Users\yuriy\Documents\GitHub\material\mdc-101\starter> npm start
> mdc-101-web#0.0.0 start C:\Users\yuriy\Documents\GitHub\material\mdc-101\starter
> webpack-dev-server --progress
10% [3] building modules 1/1 modules 0 active
Project is running at http://localhost:8081/
webpack output is served from /
[0] Hash: 555d1685cfed3b864a6318f77429ebbf5a38e07aeeac2c79f02ede37da1c2e8bbb7df60d48519ced
Version: webpack 3.12.0
Child
Hash: 555d1685cfed3b864a63
Time: 5520ms
Asset Size Chunks Chunk Names
bundle-login.css 56.6 kB [emitted]
style-bundle-login.js 335 kB 0 [emitted] [big] main
[2] multi (webpack)-dev-server/client?http://localhost:8081 ./login.scss 40 bytes {0} [built]
[3] (webpack)-dev-server/client?http://localhost:8081 7.93 kB {0} [built]
[4] ./node_modules/url/url.js 23.3 kB {0} [built]
[5] ./node_modules/node-libs-browser/node_modules/punycode/punycode.js 14.7 kB {0} [built]
[7] ./node_modules/url/util.js 314 bytes {0} [built]
[8] ./node_modules/querystring-es3/index.js 127 bytes {0} [built]
[11] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[12] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[13] ./node_modules/loglevel/lib/loglevel.js 8.86 kB {0} [built]
[14] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[15] ./node_modules/sockjs-client/dist/sockjs.js 181 kB {0} [built]
[16] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[22] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[24] (webpack)/hot/emitter.js 77 bytes {0} [built]
[26] ./login.scss 62 bytes {0} [built]
+ 12 hidden modules
Child
Hash: 18f77429ebbf5a38e07a
Time: 3083ms
Asset Size Chunks Chunk Names
style-bundle-home.js 335 kB 0 [emitted] [big] main
[2] multi (webpack)-dev-server/client?http://localhost:8081 ./home.scss 40 bytes {0} [built]
[3] (webpack)-dev-server/client?http://localhost:8081 7.93 kB {0} [built]
[4] ./node_modules/url/url.js 23.3 kB {0} [built]
[5] ./node_modules/node-libs-browser/node_modules/punycode/punycode.js 14.7 kB {0} [built]
[7] ./node_modules/url/util.js 314 bytes {0} [built]
[8] ./node_modules/querystring-es3/index.js 127 bytes {0} [built]
[11] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[12] ./node_modules/ansi-regex/index.js 135 bytes {0} [built]
[13] ./node_modules/loglevel/lib/loglevel.js 8.86 kB {0} [built]
[14] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[15] ./node_modules/sockjs-client/dist/sockjs.js 181 kB {0} [built]
[16] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[22] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[24] (webpack)/hot/emitter.js 77 bytes {0} [built]
[26] ./home.scss 565 bytes {0} [built] [failed] [1 error]
+ 12 hidden modules
ERROR in ./home.scss
Module build failed:
undefined
^
Can't find stylesheet to import.
╷
22 │ #use '#material/theme/theme-color';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules\#material\list\_variables.scss 22:1 #forward
node_modules\#material\drawer\mdc-drawer.import.scss 13:1 #import
stdin 2:9 root stylesheet
in C:\Users\yuriy\Documents\GitHub\material\mdc-101\starter\node_modules\#material\list\_variables.scss (line 22, column 1)
# multi (webpack)-dev-server/client?http://localhost:8081 ./home.scss
Child
Hash: eeac2c79f02ede37da1c
Time: 2339ms
Asset Size Chunks Chunk Names
bundle-login.js 526 kB 0 [emitted] [big] main
[5] ./node_modules/#material/ripple/foundation.js 23.4 kB {0} [built]
[6] ./node_modules/#material/ripple/util.js 1.91 kB {0} [built]
[8] ./node_modules/#material/textfield/constants.js 2.81 kB {0} [built]
[24] multi (webpack)-dev-server/client?http://localhost:8081 ./login.js 40 bytes {0} [built]
[25] (webpack)-dev-server/client?http://localhost:8081 7.93 kB {0} [built]
[26] ./node_modules/url/url.js 23.3 kB {0} [built]
[33] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[35] ./node_modules/loglevel/lib/loglevel.js 8.86 kB {0} [built]
[36] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[38] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[44] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[46] (webpack)/hot/emitter.js 77 bytes {0} [built]
[48] ./login.js 385 bytes {0} [built]
[49] ./node_modules/#material/textfield/index.js 1.36 kB {0} [built]
[61] ./node_modules/#material/ripple/index.js 1.29 kB {0} [built]
+ 47 hidden modules
Child
Hash: 2e8bbb7df60d48519ced
Time: 2142ms
Asset Size Chunks Chunk Names
bundle-home.js 437 kB 0 [emitted] [big] main
[0] ./node_modules/#material/list/constants.js 3.35 kB {0} [built]
[5] ./node_modules/#material/list/foundation.js 28.5 kB {0} [built]
[8] multi (webpack)-dev-server/client?http://localhost:8081 ./home.js 40 bytes {0} [built]
[9] (webpack)-dev-server/client?http://localhost:8081 7.93 kB {0} [built]
[10] ./node_modules/url/url.js 23.3 kB {0} [built]
[11] ./node_modules/node-libs-browser/node_modules/punycode/punycode.js 14.7 kB {0} [built]
[13] ./node_modules/url/util.js 314 bytes {0} [built]
[17] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
[19] ./node_modules/loglevel/lib/loglevel.js 8.86 kB {0} [built]
[20] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
[22] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
[28] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
[30] (webpack)/hot/emitter.js 77 bytes {0} [built]
[32] ./home.js 110 bytes {0} [built]
[33] ./node_modules/#material/list/index.js 1.25 kB {0} [built]
+ 23 hidden modules
webpack: Failed to compile.
I have tried to use npm audit, but it doesn't work. I have tried to change fibers version to 5.0.0, but anyway it doesn't work. What should I change?
My code is available here:
https://github.com/yytrofimov/material
Both component should be installed in version 6.0.0:
npm install #material/drawer#^6.0.0
npm install #material/list#^6.0.0
Related
I am using Rollup with Vite and vite-plugin-ssr.
The production build it produces with standard configuration includes a ton of tiny files, e.g.
dist/client/assets/chunk-adbd3755.js 0.69 KiB / gzip: 0.43 KiB
dist/client/assets/chunk-adbd3755.js.map 0.10 KiB
dist/client/assets/chunk-d703547b.js 2.35 KiB / gzip: 1.15 KiB
dist/client/assets/chunk-d703547b.js.map 7.79 KiB
dist/client/assets/chunk-860778e7.js 0.95 KiB / gzip: 0.51 KiB
dist/client/assets/chunk-860778e7.js.map 3.26 KiB
dist/client/assets/chunk-90693398.js 2.37 KiB / gzip: 0.94 KiB
dist/client/assets/chunk-90693398.js.map 10.18 KiB
dist/client/assets/chunk-a3b7c495.js 2.21 KiB / gzip: 1.04 KiB
dist/client/assets/chunk-a3b7c495.js.map 5.33 KiB
dist/client/assets/chunk-d321b675.js 0.67 KiB / gzip: 0.46 KiB
dist/client/assets/chunk-d321b675.js.map 4.34 KiB
dist/client/assets/chunk-c5fff223.js 0.36 KiB / gzip: 0.23 KiB
dist/client/assets/chunk-c5fff223.js.map 1.17 KiB
dist/client/assets/chunk-93f6d1e0.js 2.42 KiB / gzip: 0.93 KiB
dist/client/assets/chunk-93f6d1e0.js.map 6.81 KiB
dist/client/assets/chunk-84638231.js 0.90 KiB / gzip: 0.52 KiB
dist/client/assets/chunk-84638231.js.map 2.43 KiB
dist/client/assets/chunk-7b2a7fc5.js 16.33 KiB / gzip: 3.33 KiB
I am assuming this is determined by Rollup configuration, and I would like to force rollup to target producing chunks that are at least 5KiB in size, i.e. if there are multiple small chunks, they should be put in the same file.
How do I do that?
At the same time, there are a few very large chunks that would benefit from code splitting:
dist/client/assets/chunk-79a47c16.js 233.29 KiB / gzip: 65.45 KiB
dist/client/assets/chunk-79a47c16.js.map 1090.09 KiB
dist/client/assets/chunk-338b0152.js 295.43 KiB / gzip: 64.69 KiB
dist/client/assets/chunk-338b0152.js.map 726.44 KiB
dist/client/assets/chunk-4bad2a7c.js 850.46 KiB / gzip: 175.06 KiB
dist/client/assets/chunk-4bad2a7c.js.map 1842.03 KiB
dist/client/assets/chunk-00222315.js 1220.59 KiB / gzip: 341.05 KiB
dist/client/assets/chunk-00222315.js.map 3558.01 KiB
dist/client/assets/chunk-41093922.js 1387.07 KiB / gzip: 364.90 KiB
dist/client/assets/chunk-41093922.js.map 5215.41 KiB
Same question but inverse: How do I split them into smaller files?
Im facing Java OOM issue when system is loaded with traffic . I have allocated -Xmx=10G and i have been monitoring the memory via Jconsole , it's not even going till 10 Gb it throws error after 5Gb.
It fails with below error
Native memory allocation (mmap) failed to map 518520832 bytes for committing reserved memory
OS:DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
uname:Linux 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64
libc:glibc 2.27 NPTL 2.27
rlimit: STACK 8192k, CORE 0k, NPROC 44326, NOFILE 4096, AS infinity
load average:5,55 4,44 3,46
/proc/meminfo:
MemTotal: 11397468 kB
MemFree: 133900 kB
MemAvailable: 24040 kB
Buffers: 600 kB
Cached: 188880 kB
SwapCached: 20644 kB
Active: 9980144 kB
Inactive: 1012376 kB
Active(anon): 9965700 kB
Inactive(anon): 996552 kB
Active(file): 14444 kB
Inactive(file): 15824 kB
Unevictable: 16 kB
Mlocked: 16 kB
SwapTotal: 1003516 kB
SwapFree: 92868 kB
Dirty: 180 kB
Writeback: 596 kB
AnonPages: 10782764 kB
Mapped: 171488 kB
Shmem: 158936 kB
KReclaimable: 45080 kB
Slab: 88608 kB
SReclaimable: 45080 kB
SUnreclaim: 43528 kB
KernelStack: 16800 kB
PageTables: 76584 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 6702248 kB
Committed_AS: 23938048 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Percpu: 1264 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 167872 kB
DirectMap2M: 11505664 kB
This is the error There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 518520832 bytes for committing reserved memory
i'm trying to optimize my react web app by using gzip compression. I was able to add the webpack plugin and do the compression. But my browser is not using the compressed files it seems. Please help me since I'm new to react. Also note that I use neutrinojs. I'll mention my bundle stats below.
Asset Size Chunks Chunk Names
assets/0.3fce4eb2.js 34.2 KiB 0 [emitted] [immutable]
assets/0.3fce4eb2.js.br 8.64 KiB [emitted]
assets/0.3fce4eb2.js.gz 9.6 KiB [emitted]
assets/0.3fce4eb2.js.map 133 KiB 0 [emitted] [dev]
assets/1.289d6022.js 33.9 KiB 1 [emitted] [immutable]
assets/1.289d6022.js.br 8.46 KiB [emitted]
assets/1.289d6022.js.gz 9.53 KiB [emitted]
assets/1.289d6022.js.map 98.1 KiB 1 [emitted] [dev]
assets/1.2db4754f.css 99 bytes 1 [emitted] [immutable]
assets/1.2db4754f.css.map 238 bytes 1 [emitted] [dev]
assets/10.b8f7f8a6.js 14.6 KiB 10 [emitted] [immutable]
assets/10.b8f7f8a6.js.br 5.12 KiB [emitted]
assets/10.b8f7f8a6.js.gz 5.68 KiB [emitted]
assets/10.b8f7f8a6.js.map 52.5 KiB 10 [emitted] [dev]
assets/11.14cee74f.js 856 bytes 11 [emitted] [immutable]
assets/11.14cee74f.js.map 3.07 KiB 11 [emitted] [dev]
assets/11.74159567.css 7.27 KiB 11 [emitted] [immutable]
assets/11.74159567.css.br 1.42 KiB [emitted]
assets/11.74159567.css.gz 1.66 KiB [emitted]
assets/11.74159567.css.map 8.37 KiB 11 [emitted] [dev]
assets/12.6d40dbcc.js 1.33 KiB 12 [emitted] [immutable]
assets/12.6d40dbcc.js.br 671 bytes [emitted]
assets/12.6d40dbcc.js.gz 787 bytes [emitted]
assets/12.6d40dbcc.js.map 1.96 KiB 12 [emitted] [dev]
assets/13.3d0e5b84.js 22.4 KiB 13 [emitted] [immutable]
assets/13.3d0e5b84.js.br 5.71 KiB [emitted]
assets/13.3d0e5b84.js.gz 6.55 KiB [emitted]
assets/13.3d0e5b84.js.map 87.2 KiB 13 [emitted] [dev]
assets/14.52749a43.js 8.25 KiB 14 [emitted] [immutable]
assets/14.52749a43.js.br 2.44 KiB [emitted]
assets/14.52749a43.js.gz 2.84 KiB [emitted]
assets/14.52749a43.js.map 19.6 KiB 14 [emitted] [dev]
assets/15.05afd908.js 21.1 KiB 15 [emitted] [immutable]
assets/15.05afd908.js.br 7.48 KiB [emitted]
assets/15.05afd908.js.gz 9.68 KiB [emitted]
assets/15.05afd908.js.map 154 KiB 15 [emitted] [dev]
assets/2.25cbca89.js 252 bytes 2 [emitted] [immutable]
assets/2.25cbca89.js.map 547 bytes 2 [emitted] [dev]
assets/3.36420eb7.css 618 bytes 3 [emitted] [immutable]
assets/3.36420eb7.css.map 938 bytes 3 [emitted] [dev]
assets/3.6d75eeb4.js 22.2 KiB 3 [emitted] [immutable]
assets/3.6d75eeb4.js.br 6.07 KiB [emitted]
assets/3.6d75eeb4.js.gz 6.91 KiB [emitted]
assets/3.6d75eeb4.js.map 62.9 KiB 3 [emitted] [dev]
assets/4.aa3c9f8e.js 81.1 KiB 4 [emitted] [immutable]
assets/4.aa3c9f8e.js.br 16.2 KiB [emitted]
assets/4.aa3c9f8e.js.gz 18.5 KiB [emitted]
assets/4.aa3c9f8e.js.map 265 KiB 4 [emitted] [dev]
assets/4.de23ee90.css 90 bytes 4 [emitted] [immutable]
assets/4.de23ee90.css.map 259 bytes 4 [emitted] [dev]
assets/7.0b2209a3.js 4.22 MiB 7 [emitted] [immutable] [big]
assets/7.0b2209a3.js.br 940 KiB [emitted] [big]
assets/7.0b2209a3.js.gz 1.19 MiB [emitted] [big]
assets/7.0b2209a3.js.map 14.6 MiB 7 [emitted] [dev]
assets/7.59caa759.css 259 KiB 7 [emitted] [immutable] [big]
assets/7.59caa759.css.br 23.6 KiB [emitted]
assets/7.59caa759.css.gz 30.6 KiB [emitted]
assets/7.59caa759.css.map 314 KiB 7 [emitted] [dev]
I really don't know why there are this much of files because I have seen only 2 to 4 files in examples. But I can see that there are gzip and brotli compressed files. But the browser says there are no content-encoding. I only added the plugin to config file and I think there is something more to do. Also I'm running this locally. Please help me with what could have gone wrong. Thank you.
If you have express js backend you can do something like below with compression package.in your main js file.
const compression = require('compression')
app.use(compression())
compression package
I couldn't find any information on what [vectors] mean in /proc/pid/smaps.
Here is a continuous part of some my smaps file:
76eec000-76f11000 rw-p 0025b000 00:0c 32363615 /usr/lib/libQt5Quick.so.5.0.0
Size: 148 kB
Rss: 148 kB
Pss: 97 kB
Shared_Clean: 60 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 88 kB
Referenced: 148 kB
Anonymous: 88 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac
76f11000-76f14000 rw-p 00000000 00:00 0 [vectors]
Size: 12 kB
Rss: 12 kB
Pss: 12 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 12 kB
Referenced: 12 kB
Anonymous: 12 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac
I wonder if [vectors] is also related to the previous library libQt5Quick.so.5.0.0.
I need to count memory consumed by a process and particular libraries in it, so I need to know if I have to count [vectors] output
[vectors] indicates a page used by the VDSO mechanism. VDSO is a way of accelerating common system calls by eliminating the overhead of context switching.
Basically the kernel just shares a bit of its memory with the result of common system calls (think gettimeofday() and the like) where your user space process can read it.
You should not count it as used memory, as the same memory will be shared by all processes.
I'm trying to understand how meminfo tracks memory. Here's what I'm looking at:
MemTotal: 341596 kB
MemFree: 147288 kB
Buffers: 56 kB
Cached: 46752 kB
SwapCached: 0 kB
Active: 86928 kB
Inactive: 41384 kB
Active(anon): 81532 kB
Inactive(anon): 288 kB
Active(file): 5396 kB
Inactive(file): 41096 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 81532 kB
Mapped: 87648 kB
Shmem: 316 kB
Slab: 11568 kB
SReclaimable: 2580 kB
SUnreclaim: 8988 kB
KernelStack: 3232 kB
PageTables: 5480 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 170796 kB
Committed_AS: 2692436 kB
VmallocTotal: 327680 kB
VmallocUsed: 59244 kB
VmallocChunk: 259076 kB
Here are my questions:
1) How can I account for all 341596kB of memory? Clearly 147288 are free. How can I account for the remaining memory? (short of writing a problem to solve the zero-subset-sum problem, I mean...)
2) Total inactive/active file memory is 46492, but Mapped is 87648. But, according to the manual, it's
Mapped: files which have been mmaped, such as libraries
so.. how could there be more pages devoted to mapped files than there are files themselves?
Due diligence I've seen other posts on SO related to this subject, but none that explains how to account for all the "used" memory here... Also, I've found the Linux Kernel file explaining /proc/meminfo -- it just doesn't seem to have the complete information I want.