반응형
벤더의 규모를 초과
안녕하세요, 크기를 변경하거나 벤더를 분할할 수 없었습니다.서버를 로드하지 않는 이유와 몇 초 후에 종료합니다.
문제는 nuxt auth를 도입하려고 하는데 서버가 이것을 돌려줬다는 것입니다.단말기 응답은 아래와 같습니다.
이전에는 모든 것이 정상적으로 동작했지만, 예상외로 로딩하고 싶지 않았고, 몇 초 후에 이 앱을 실행하려고 할 때마다 서버가 종료되었습니다.
또, 서버가 정상적으로 동작하기 전에 코드의 일부를 삭제한 후에도, 혹은 새로운 프로젝트 벤더를 작성한 후에도, 이 에러는 계속 발생하고 있습니다만, 파일을 추가해 사이즈를 조금 넘을 때까지 모든 것이 동작합니다.
이 문제가 벤더의 사이즈와 관련되어 있다는 것을 알고 nuxt.config.js의 빌드를 변경하여 청크의 크기를 변경하거나 더 작은 부분으로 분할하려고 했지만 아무 일도 일어나지 않았습니다.
고칠 줄 아는 사람 있어요?
잘 부탁드립니다.
npm 실행 생성
13:54:04 ✔ Nuxt files generated
✔ Client
Compiled successfully in 18.61s
✔ Server
Compiled successfully in 11.82s
13:54:17 WARN Unable to update lock within the stale threshold
at options.fs.stat (node_modules/proper-lockfile/lib/lockfile.js:136:25)
at node_modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:154:5)
Hash: a63f30e1da8b54b4e1e5
Version: webpack 4.31.0
Time: 18616ms
Built at: 2019-05-12 13:54:26
Asset Size Chunks Chunk Names
../server/client.manifest.json 18.5 KiB [emitted]
19efd8abbee3a8a33be4.js 1.66 KiB 4 [emitted] pages/register
35ca09b69194d90b94ba.js 284 bytes 2 [emitted] pages/index
3e8ab344ce99545b414a.js 189 KiB 1 [emitted] commons.app
40bd82d4e1d1a04a75a9.js 2.27 KiB 5 [emitted] runtime
LICENSES 2.26 KiB [emitted]
be138e70225ef677bf11.js 49.2 KiB 0 [emitted] app
ea98f7e0cb05705cdd19.js 2.09 KiB 3 [emitted] pages/login
ebfb93d5cff67de3634c.js 413 KiB 6 [emitted] [big] vendors.app
+ 2 hidden assets
Entrypoint app = 40bd82d4e1d1a04a75a9.js 3e8ab344ce99545b414a.js ebfb93d5cff67de3634c.js be138e70225ef677bf11.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
ebfb93d5cff67de3634c.js (413 KiB)
Hash: 2686db6f213979a0c61c
Version: webpack 4.31.0
Time: 11817ms
Built at: 2019-05-12 13:54:38
Asset Size Chunks Chunk Names
451e987fc41d64bb12d2.js 1.35 KiB 2 [emitted] pages/login
6365a6c7ab9c235b4be2.js 330 bytes 1 [emitted] pages/index
b65301e6570f75dc06a3.js 1.61 KiB 3 [emitted] pages/register
server.js 398 KiB 0 [emitted] app
server.manifest.json 483 bytes [emitted]
+ 4 hidden assets
Entrypoint app = server.js server.js.map
13:54:38 ℹ Generating pages
13:54:40 ✔ Generated /login
13:54:40 ✔ Generated /register
13:54:40 ✔ Generated /
npm 이후에 dev를 실행합니다.
13:48:02 ℹ Preparing project for development
13:48:02 ℹ Initial build may take a while
13:48:02 ✔ Builder initialized
13:48:02 ✔ Nuxt files generated
✔ Client
Compiled successfully in 7.71s
✔ Server
Compiled successfully in 5.85s
13:48:16 ℹ Waiting for file changes
13:48:16 ℹ Memory usage: 151 MB (RSS: 260 MB)
<--- Last few GCs --->
[4505:0x10264a000] 79635 ms: Mark-sweep 1264.9 (1425.4) -> 1264.0 (1425.9) MB, 1629.7 / 0.2 ms (average mu = 0.216, current mu = 0.135) allocation failure scavenge might not succeed
[4505:0x10264a000] 81812 ms: Mark-sweep 1265.2 (1425.9) -> 1264.8 (1427.4) MB, 1912.8 / 0.3 ms (average mu = 0.168, current mu = 0.121) deserialize GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x41f436e5261]
Security context: 0x30d36aa9e6e9 <JSObject>
1: createContext(aka createContext) [0x30d31809fa31] [vm.js:~240] [pc=0x41f435541c1](this=0x30d36df826f1 <undefined>,/* anonymous */=0x30d33fda7019 <Object map = 0x30d3de4c0fd1>,/* anonymous */=0x30d33fda7121 <Object map = 0x30d36ac02571>)
2: runInNewContext [0x30d3180823e9] [vm.js:135] [bytecode=0x30d3452e00c9 offset=15](this=0x30d35c4822a1 <Contexti...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10003c597 node::Abort() [/usr/local/bin/node]
2: 0x10003c7a1 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
3: 0x1001ad575 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0x100579242 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
5: 0x10057bd15 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/bin/node]
6: 0x100577bbf v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
7: 0x100575d94 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
8: 0x100579172 v8::internal::Heap::ReserveSpace(std::__1::vector<v8::internal::Heap::Chunk, std::__1::allocator<v8::internal::Heap::Chunk> >*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*) [/usr/local/bin/node]
9: 0x100855687 v8::internal::DefaultDeserializerAllocator::ReserveSpace() [/usr/local/bin/node]
10: 0x10085e035 v8::internal::PartialDeserializer::Deserialize(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSGlobalProxy>, v8::DeserializeInternalFieldsCallback) [/usr/local/bin/node]
11: 0x10085dfd4 v8::internal::PartialDeserializer::DeserializeContext(v8::internal::Isolate*, v8::internal::SnapshotData const*, bool, v8::internal::Handle<v8::internal::JSGlobalProxy>, v8::DeserializeInternalFieldsCallback) [/usr/local/bin/node]
12: 0x100867455 v8::internal::Snapshot::NewContextFromSnapshot(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSGlobalProxy>, unsigned long, v8::DeserializeInternalFieldsCallback) [/usr/local/bin/node]
13: 0x100233c36 v8::internal::Genesis::Genesis(v8::internal::Isolate*, v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, unsigned long, v8::DeserializeInternalFieldsCallback, v8::internal::GlobalContextType) [/usr/local/bin/node]
14: 0x100217f91 v8::internal::Bootstrapper::CreateEnvironment(v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*, unsigned long, v8::DeserializeInternalFieldsCallback, v8::internal::GlobalContextType) [/usr/local/bin/node]
15: 0x1001cd8c7 v8::NewContext(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, unsigned long, v8::DeserializeInternalFieldsCallback) [/usr/local/bin/node]
16: 0x1001af159 v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, v8::DeserializeInternalFieldsCallback) [/usr/local/bin/node]
17: 0x1000422d1 node::NewContext(v8::Isolate*, v8::Local<v8::ObjectTemplate>) [/usr/local/bin/node]
18: 0x10006345b node::contextify::ContextifyContext::CreateV8Context(node::Environment*, v8::Local<v8::Object>, node::contextify::ContextOptions const&) [/usr/local/bin/node]
19: 0x10006324f node::contextify::ContextifyContext::ContextifyContext(node::Environment*, v8::Local<v8::Object>, node::contextify::ContextOptions const&) [/usr/local/bin/node]
20: 0x100064ab1 node::contextify::ContextifyContext::MakeContext(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
21: 0x41f436e5261
22: 0x41f435541c1
23: 0x41f42d918d5
Abort trap: 6
또한 nuxt 프로젝트를 새로 만들고 npm run generate를 실행한 후 터미널 응답도 받습니다.
✔ Client
Compiled successfully in 19.49s
✔ Server
Compiled successfully in 12.06s
14:31:30 ERROR (node:5036) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
14:31:34 WARN Unable to update lock within the stale threshold
at options.fs.stat (node_modules/proper-lockfile/lib/lockfile.js:136:25)
at node_modules/graceful-fs/polyfills.js:285:20
at FSReqWrap.oncomplete (fs.js:154:5)
Hash: 523464a4f215ecad138a
Version: webpack 4.31.0
Time: 19497ms
Built at: 2019-05-12 14:31:49
Asset Size Chunks Chunk Names
../server/client.manifest.json 17.2 KiB [emitted]
5359710684b4ec80d12c.js 2.22 KiB 3 [emitted] runtime
5ad858d838bf3e368436.js 3.65 KiB 2 [emitted] pages/index
6773aee58a76de65a958.js 164 KiB 1 [emitted] commons.app
6953a06a30bda4b69151.js 413 KiB 4 [emitted] [big] vendors.app
7ec00afb1f7acea69260.js 34.1 KiB 0 [emitted] app
LICENSES 1.8 KiB [emitted]
icons/icon_120.9mld2VBMsQ$.png 3.05 KiB [emitted]
icons/icon_144.9mld2VBMsQ$.png 3.78 KiB [emitted]
icons/icon_152.9mld2VBMsQ$.png 3.96 KiB [emitted]
icons/icon_192.9mld2VBMsQ$.png 5.01 KiB [emitted]
icons/icon_384.9mld2VBMsQ$.png 11 KiB [emitted]
icons/icon_512.9mld2VBMsQ$.png 13.9 KiB [emitted]
icons/icon_64.9mld2VBMsQ$.png 1.61 KiB [emitted]
manifest.89571180.json 831 bytes [emitted]
+ 2 hidden assets
Entrypoint app = 5359710684b4ec80d12c.js 6773aee58a76de65a958.js 6953a06a30bda4b69151.js 7ec00afb1f7acea69260.js
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
6953a06a30bda4b69151.js (413 KiB)
Hash: 86e05930b1fece3cf75c
Version: webpack 4.31.0
Time: 12068ms
Built at: 2019-05-12 14:32:01
Asset Size Chunks Chunk Names
7d1bee16c2e1af97f877.js 3.71 KiB 1 [emitted] pages/index
server.js 386 KiB 0 [emitted] app
server.manifest.json 243 bytes [emitted]
+ 2 hidden assets
Entrypoint app = server.js server.js.map
14:32:01 ℹ Generating pages
14:32:02 ✔ Generated /
빌드 청크에 크기를 적용하려면 nuxt.config.js에서 이 구성을 시도할 수 있습니다.
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
if (ctx && ctx.isClient) {
config.optimization.splitChunks.maxSize = 64000
}
}
}
언급URL : https://stackoverflow.com/questions/56099042/exceeding-the-size-of-vendor
반응형
'source' 카테고리의 다른 글
Android 버튼 객체 내에서 텍스트 주변의 내부 패딩을 줄이려면 어떻게 해야 합니까? (0) | 2022.10.01 |
---|---|
Mac에 설치한 후 ALTER USER 문을 사용하여 MySQL 루트 암호 재설정 (0) | 2022.10.01 |
수업의 모든 메서드를 특정 코드 블록으로 시작하는 우아한 방법이 있을까요? (0) | 2022.10.01 |
배열 반복 중 현재 요소가 마지막 요소인지 확인하는 중 (0) | 2022.10.01 |
"forEach" 함수에서 "return" 키워드는 무엇을 의미합니까? (0) | 2022.10.01 |