FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
See original GitHub issueI keep getting this error:
“11:46:58.286 FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory”
There is an extensive discussion about a similar error here: https://github.com/vercel/next.js/issues/7929
But not sure if it is related
vercel.json:
{
"version": 2,
"builds": [
{
"src": "nuxt.config.js",
"use": "@nuxtjs/vercel-builder",
"config": {
"generateStaticRoutes": false
}
}
]
}
package.json:
{
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build --modern=server",
"start": "nuxt start --modern=server",
"build:modern": "nuxt build --modern=server",
"start:modern": "nuxt start --modern=server",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"test": "jest"
},
"lint-staged": {
"*.{js,vue}": "eslint"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"dependencies": {
"@johmun/vue-tags-input": "^2.1.0",
"@nuxt/content": "^1.11.1",
"@nuxtjs/apollo": "^4.0.1-rc.5",
"@nuxtjs/auth-next": "=5.0.0-1611574754.9020f2a",
"@nuxtjs/axios": "^5.9.7",
"@nuxtjs/device": "^1.2.7",
"@nuxtjs/redirect-module": "^0.3.1",
"@nuxtjs/robots": "^2.4.2",
"@nuxtjs/sentry": "<5",
"@uppy/core": "^1.16.2",
"@uppy/transloadit": "^1.6.22",
"@uppy/vue": "^0.1.7",
"@uppy/webcam": "^1.8.7",
"algoliasearch": "^4.6.0",
"axios": "^0.21.1",
"bootstrap-vue": "^2.21.2",
"cookies-eu-banner": "^2.0.1",
"getstream": "^7.2.1",
"graphql-tag": "^2.10.3",
"instantsearch.js": "^4.14.1",
"linkifyjs": "^3.0.0-beta.3",
"nuxt": "^2.15.6",
"nuxt-jsonld": "^1.5.0",
"sanitize-html": "^2.3.3",
"search-insights": "^1.6.3",
"smooth-scroll-into-view-if-needed": "^1.1.29",
"storyblok-nuxt": "2.0.1",
"sweetalert2": "^9.10.12",
"tiptap": "^1.27.1",
"tiptap-extensions": "^1.32.1",
"typesense-instantsearch-adapter": "https://github.com/reinoldus/typesense-instantsearch-adapter.git#custom-build2",
"universal-cookie": "^4.0.3",
"v-lazy-image": "^1.4.0",
"vee-validate": "^3.2.5",
"vue-fa": "^2.0.1",
"vue-instantsearch": "^3.4.3",
"vue-lazy-hydration": "^2.0.0-beta.4",
"vuedraggable": "^2.24.0",
"vuelidate": "^0.7.6"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/runtime-corejs3": "^7.12.13",
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/pro-duotone-svg-icons": "^5.15.3",
"@fortawesome/pro-light-svg-icons": "^5.15.1",
"@fortawesome/pro-solid-svg-icons": "^5.15.1",
"@nuxt/types": "^2.14.12",
"@nuxtjs/eslint-config": "^2.0.2",
"@nuxtjs/eslint-module": "^1.0.0",
"@nuxtjs/pwa": "^3.2.2",
"@nuxtjs/style-resources": "^1.0.0",
"@vue/test-utils": "^1.0.0-beta.33",
"babel-eslint": "^10.1.0",
"babel-jest": "^24.1.0",
"core-js": "3",
"eslint": "^7.19.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-nuxt": "^0.5.2",
"eslint-plugin-prettier": "^3.1.3",
"husky": "^2.6.0",
"jest": "^26.6.3",
"lint-staged": "^8.2.1",
"node-sass": "^4.13.1",
"prettier": "^2.2.1",
"sass-loader": "^8.0.2",
"typescript": "^4.1.3",
"vue-jest": "^4.0.0-0",
"yarn": "^1.22.10"
}
}
Vercel log:
11:49:06.870 Cloning gitlab.com/xxxx/xxx (Branch: master, Commit: e44cd0b)
11:49:07.657 Cloning completed: 786.408ms
11:49:07.759 Analyzing source code...
11:49:07.770 Warning: Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
11:49:09.388 Installing build runtime...
11:49:13.859 Build runtime installed: 4.471s
11:49:17.440 Looking up build cache...
11:49:17.772 Build cache not found
11:49:19.232 [log] Running with @nuxt/vercel-builder version 0.21.2
11:49:19.232 [log] ----------------- Prepare build -----------------
11:49:19.232 [log] Downloading files...
11:49:19.233 [log] Working directory: /vercel/path0
11:49:19.238 [log] Using yarn
11:49:19.239 [info] Prepare build took: 6.788665 ms
11:49:19.239 [log] ----------------- Install devDependencies -----------------
11:49:19.676 yarn install v1.22.10
11:49:19.836 [1/5] Resolving packages...
11:49:20.955 [2/5] Fetching packages...
11:50:09.689 info fsevents@2.3.2: The platform "linux" is incompatible with this module.
11:50:09.689 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
11:50:09.722 info fsevents@1.2.13: The platform "linux" is incompatible with this module.
11:50:09.722 info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
11:50:09.738 [3/5] Linking dependencies...
11:50:09.741 warning " > @johmun/vue-tags-input@2.1.0" has unmet peer dependency "vue@2.x".
11:50:09.741 warning "@nuxt/content > @nuxt/types > sass-loader@10.1.1" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
11:50:09.743 warning " > @nuxtjs/apollo@4.0.1-rc.5" has unmet peer dependency "apollo-cache-inmemory@^1.6.6".
11:50:09.743 warning "@nuxtjs/apollo > vue-cli-plugin-apollo@0.22.2" has unmet peer dependency "@vue/cli-shared-utils@^3.0.0 || ^4.0.0-0".
11:50:09.745 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo-link-persisted-queries@0.2.2" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:50:09.746 warning " > graphql-tag@2.11.0" has unmet peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:50:09.751 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:50:09.754 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-parser@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:50:09.755 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-types@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:50:09.755 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-utils@2.0.2" has incorrect peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0".
11:50:09.757 warning "babel-jest > babel-preset-jest > @babel/plugin-syntax-object-rest-spread@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
11:50:09.758 warning "vue-jest > @babel/plugin-transform-modules-commonjs@7.13.8" has unmet peer dependency "@babel/core@^7.0.0-0".
11:50:09.759 warning " > @nuxtjs/auth-next@5.0.0-1611574754.9020f2a" has unmet peer dependency "vue@*".
11:50:09.759 warning " > @uppy/vue@0.1.7" has unmet peer dependency "vue@>=2.6.11".
11:50:09.760 warning "bootstrap-vue > bootstrap@4.6.0" has unmet peer dependency "jquery@1.9.1 - 3".
11:50:09.760 warning "bootstrap-vue > portal-vue@2.1.7" has unmet peer dependency "vue@^2.5.18".
11:50:09.761 warning " > getstream@7.2.1" has unmet peer dependency "@types/node@>=10".
11:50:09.761 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "jquery@>= 1.11.0".
11:50:09.761 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "react@>= 0.14.0".
11:50:09.761 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "react-dom@>= 0.14.0".
11:50:09.761 warning "nuxt > @nuxt/components@2.1.8" has unmet peer dependency "consola@*".
11:50:09.764 warning "@babel/plugin-proposal-optional-chaining > @babel/plugin-syntax-optional-chaining@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
11:50:09.772 warning " > tiptap@1.32.1" has unmet peer dependency "vue@^2.5.17".
11:50:09.773 warning " > tiptap@1.32.1" has unmet peer dependency "vue-template-compiler@^2.5.17".
11:50:09.773 warning " > tiptap-extensions@1.35.1" has unmet peer dependency "vue@^2.5.17".
11:50:09.773 warning " > tiptap-extensions@1.35.1" has unmet peer dependency "vue-template-compiler@^2.5.17".
11:50:09.773 warning " > typesense-instantsearch-adapter@1.2.1-0" has unmet peer dependency "@babel/runtime@^7.13.17".
11:50:09.773 warning "typesense-instantsearch-adapter > typesense@0.11.2" has unmet peer dependency "@babel/runtime@^7.10.2".
11:50:09.774 warning " > v-lazy-image@1.4.0" has unmet peer dependency "vue@^2.0.0".
11:50:09.774 warning " > vee-validate@3.4.5" has unmet peer dependency "vue@^2.5.18".
11:50:09.774 warning " > vue-instantsearch@3.5.0" has unmet peer dependency "vue@^2.6.0".
11:50:09.774 warning " > vue-instantsearch@3.5.0" has unmet peer dependency "vue-server-renderer@^2.6.11".
11:50:09.774 warning " > @babel/plugin-proposal-optional-chaining@7.13.8" has unmet peer dependency "@babel/core@^7.0.0-0".
11:50:09.774 warning " > @nuxtjs/eslint-config@2.0.2" has incorrect peer dependency "eslint@^6.8.0".
11:50:09.774 warning "@nuxtjs/eslint-config > eslint-plugin-import@2.19.1" has incorrect peer dependency "eslint@2.x - 6.x".
11:50:09.775 warning "@nuxtjs/eslint-config > eslint-plugin-vue@6.2.2" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
11:50:09.775 warning "@nuxtjs/eslint-config > eslint-plugin-unicorn > eslint-template-visitor@1.1.0" has incorrect peer dependency "eslint@^6.4.0".
11:50:09.776 warning " > @nuxtjs/eslint-module@1.2.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0".
11:50:09.776 warning "@nuxtjs/eslint-module > eslint-loader@4.0.2" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
11:50:09.776 warning " > @vue/test-utils@1.1.3" has unmet peer dependency "vue@2.x".
11:50:09.776 warning " > @vue/test-utils@1.1.3" has unmet peer dependency "vue-template-compiler@^2.x".
11:50:09.776 warning " > babel-jest@24.9.0" has unmet peer dependency "@babel/core@^7.0.0".
11:50:09.776 warning "babel-jest > babel-preset-jest@24.9.0" has unmet peer dependency "@babel/core@^7.0.0".
11:50:09.777 warning " > sass-loader@8.0.2" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
11:50:09.778 warning " > vue-jest@4.0.1" has unmet peer dependency "@babel/core@7.x".
11:50:09.778 warning " > vue-jest@4.0.1" has unmet peer dependency "vue@^2.x".
11:50:09.778 warning " > vue-jest@4.0.1" has unmet peer dependency "vue-template-compiler@^2.x".
11:50:41.035 [4/5] Building fresh packages...
11:50:47.719 [5/5] Cleaning modules...
11:50:57.694 Done in 98.02s.
11:50:57.746 [info] Install devDependencies took: 98506.926178 ms
11:50:57.747 [log] ----------------- Nuxt build -----------------
11:50:59.463 [log] Running nuxt build --standalone --no-lock --config-file "nuxt.config.js" /vercel/path0
11:50:59.718 [warn] sass-loader@8.0.2 is installed but ^10.1.1 is expected
11:51:16.098 [error] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules_dev/bootstrap-vue/src/icons/icons.js as it exceeds the max of 500KB.
11:52:32.079 [error] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules_dev/bootstrap-vue/src/icons/icons.js as it exceeds the max of 500KB.
11:53:02.247 [info] Nuxt build took: 124500.16422 ms
11:53:02.247 [log] ----------------- Install dependencies -----------------
11:53:02.563 yarn install v1.22.10
11:53:02.733 [1/5] Resolving packages...
11:53:04.642 [2/5] Fetching packages...
11:53:05.094 info fsevents@2.3.2: The platform "linux" is incompatible with this module.
11:53:05.095 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
11:53:05.109 [3/5] Linking dependencies...
11:53:05.111 warning " > @johmun/vue-tags-input@2.1.0" has unmet peer dependency "vue@2.x".
11:53:05.111 warning "@nuxt/content > @nuxt/types > sass-loader@10.1.1" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
11:53:05.112 warning " > @nuxtjs/apollo@4.0.1-rc.5" has unmet peer dependency "apollo-cache-inmemory@^1.6.6".
11:53:05.112 warning "@nuxtjs/apollo > vue-cli-plugin-apollo@0.22.2" has unmet peer dependency "@vue/cli-shared-utils@^3.0.0 || ^4.0.0-0".
11:53:05.113 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo-link-persisted-queries@0.2.2" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:53:05.114 warning " > graphql-tag@2.11.0" has unmet peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:53:05.114 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > ts-node@8.10.2" has unmet peer dependency "typescript@>=2.7".
11:53:05.119 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:53:05.122 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-parser@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:53:05.122 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-types@2.0.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
11:53:05.122 warning "@nuxtjs/apollo > vue-cli-plugin-apollo > apollo > apollo-language-server > @apollographql/graphql-language-service-interface > @apollographql/graphql-language-service-utils@2.0.2" has incorrect peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0".
11:53:05.125 warning " > @nuxtjs/auth-next@5.0.0-1611574754.9020f2a" has unmet peer dependency "vue@*".
11:53:05.126 warning " > @uppy/vue@0.1.7" has unmet peer dependency "vue@>=2.6.11".
11:53:05.126 warning "bootstrap-vue > bootstrap@4.6.0" has unmet peer dependency "jquery@1.9.1 - 3".
11:53:05.127 warning "bootstrap-vue > portal-vue@2.1.7" has unmet peer dependency "vue@^2.5.18".
11:53:05.127 warning " > getstream@7.2.1" has unmet peer dependency "@types/node@>=10".
11:53:05.127 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "jquery@>= 1.11.0".
11:53:05.127 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "react@>= 0.14.0".
11:53:05.127 warning " > linkifyjs@3.0.0-beta.3" has unmet peer dependency "react-dom@>= 0.14.0".
11:53:05.127 warning "nuxt-jsonld > schema-dts@0.7.4" has unmet peer dependency "typescript@>=3.4.0".
11:53:05.127 warning " > tiptap@1.32.1" has unmet peer dependency "vue@^2.5.17".
11:53:05.127 warning " > tiptap@1.32.1" has unmet peer dependency "vue-template-compiler@^2.5.17".
11:53:05.128 warning " > tiptap-extensions@1.35.1" has unmet peer dependency "vue@^2.5.17".
11:53:05.128 warning " > tiptap-extensions@1.35.1" has unmet peer dependency "vue-template-compiler@^2.5.17".
11:53:05.128 warning " > typesense-instantsearch-adapter@1.2.1-0" has unmet peer dependency "@babel/runtime@^7.13.17".
11:53:05.128 warning "typesense-instantsearch-adapter > typesense@0.11.2" has unmet peer dependency "@babel/runtime@^7.10.2".
11:53:05.128 warning " > v-lazy-image@1.4.0" has unmet peer dependency "vue@^2.0.0".
11:53:05.128 warning " > vee-validate@3.4.5" has unmet peer dependency "vue@^2.5.18".
11:53:05.128 warning " > vue-instantsearch@3.5.0" has unmet peer dependency "vue@^2.6.0".
11:53:05.128 warning " > vue-instantsearch@3.5.0" has unmet peer dependency "vue-server-renderer@^2.6.11".
11:53:17.506 [4/5] Building fresh packages...
11:53:19.322 [5/5] Cleaning modules...
11:53:23.755 Done in 21.20s.
11:53:23.789 [info] Install dependencies took: 21541.488241 ms
11:53:23.789 [log] ----------------- Collect artifacts -----------------
11:54:12.464 [info] Collect artifacts took: 48673.61095 ms
11:54:19.264 <--- Last few GCs --->
11:54:19.264 [333:0x4902f20] 295873 ms: Scavenge 346.6 (426.8) -> 346.6 (426.8) MB, 28.1 / 0.0 ms (average mu = 0.990, current mu = 0.996) allocation failure
11:54:19.264 [333:0x4902f20] 297188 ms: Scavenge 538.6 (618.8) -> 538.6 (618.8) MB, 55.3 / 0.0 ms (average mu = 0.990, current mu = 0.996) allocation failure
11:54:19.264 [333:0x4902f20] 299841 ms: Scavenge 922.6 (1002.8) -> 922.6 (1002.8) MB, 110.0 / 0.0 ms (average mu = 0.990, current mu = 0.996) allocation failure
11:54:19.264 <--- JS stacktrace --->
11:54:19.264 FATAL ERROR: invalid array length Allocation failed - JavaScript heap out of memory
11:54:19.265 1: 0xa04200 node::Abort() [/node14/bin/node]
11:54:19.265 2: 0x94e4e9 node::FatalError(char const*, char const*) [/node14/bin/node]
11:54:19.265 3: 0xb7978e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/node14/bin/node]
11:54:19.266 4: 0xb79b07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/node14/bin/node]
11:54:19.266 5: 0xd34395 [/node14/bin/node]
11:54:19.267 6: 0xd0ced5 [/node14/bin/node]
11:54:19.267 7: 0xe95ace [/node14/bin/node]
11:54:19.268 8: 0xe9b354 [/node14/bin/node]
11:54:19.269 9: 0xe9b498 [/node14/bin/node]
11:54:19.269 10: 0xeef15b v8::internal::JSObject::AddDataElement(v8::internal::Handle<v8::internal::JSObject>, unsigned int, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes) [/node14/bin/node]
11:54:19.270 11: 0xf43c62 v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::Maybe<v8::internal::ShouldThrow>, v8::internal::StoreOrigin) [/node14/bin/node]
11:54:19.270 12: 0xf46f5f v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [/node14/bin/node]
11:54:19.271 13: 0x10709e5 v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [/node14/bin/node]
11:54:19.272 14: 0xdcfb3a v8::internal::Runtime_KeyedStoreIC_Slow(int, unsigned long*, v8::internal::Isolate*) [/node14/bin/node]
11:54:19.272 15: 0x1401219 [/node14/bin/node]
11:54:46.903 Sandbox exited with code null and signal SIGABRT
11:54:46.910 [ 71.046220] ixgbevf 0000:00:04.0: NIC Link is Up 10 Gbps
11:54:46.910 [ 71.047743] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
11:54:46.911 [ 71.060703] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
11:54:46.911 [ 162.710636] cgroup: cgroup: disabling cgroup2 socket matching due to net_prio or net_cls activation
11:54:47.713 Error: Malformed input
11:54:47.714 at Object.purposeError (/var/task/webpack:/@zeit/api/scripts/build-container/src/utils/purpose-error.ts:6:1)
11:54:47.714 at mainSubSub (/var/task/webpack:/@zeit/api/scripts/build-container/src/sandbox.ts:99:1)
11:54:47.714 at mainSub (/var/task/webpack:/@zeit/api/scripts/build-container/src/sandbox.ts:53:1)
11:54:47.714 at /var/task/webpack:/@zeit/api/scripts/build-container/src/sandbox.ts:40:1
11:54:47.714 at /var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/tracer.js:45:1
11:54:47.714 at Scope._activate (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/scope/async_resource.js:47:1)
11:54:47.714 at Scope.activate (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/scope/base.js:12:1)
11:54:47.714 at DatadogTracer.trace (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/tracer.js:45:1)
11:54:47.715 at Tracer.trace (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/proxy.js:76:1)
11:54:47.715 at main (/var/task/webpack:/@zeit/api/scripts/build-container/src/sandbox.ts:40:1)
11:54:47.718 build container sandbox main TypeError: Cannot read property 'dc' of undefined
11:54:47.718 at patchBuild (/var/task/webpack:/@zeit/api/scripts/build-container/src/utils/patch-build.ts:18:1)
11:54:47.719 at /var/task/webpack:/@zeit/api/scripts/build-container/src/utils/patch-build.ts:270:1
11:54:47.719 at /var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/tracer.js:45:1
11:54:47.719 at Scope._activate (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/scope/async_resource.js:47:1)
11:54:47.719 at Scope.activate (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/scope/base.js:12:1)
11:54:47.719 at DatadogTracer.trace (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/tracer.js:45:1)
11:54:47.719 at Tracer.trace (/var/task/webpack:/@zeit/api/node_modules/dd-trace/packages/dd-trace/src/proxy.js:76:1)
11:54:47.719 at Object.patchBuildToError (/var/task/webpack:/@zeit/api/scripts/build-container/src/utils/patch-build.ts:269:1)
11:54:47.719 at mainSub (/var/task/webpack:/@zeit/api/scripts/build-container/src/sandbox.ts:59:1)
11:54:47.719 at processTicksAndRejections (internal/process/task_queues.js:93:5)
If I run vercel dev
, I am running into this error:
WARNING in ./node_modules_dev/engine.io-client/node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/home/ubuntu/git/wimj-website2/node_modules_dev/engine.io-client/node_modules/ws/lib'
@ ./node_modules_dev/engine.io-client/node_modules/ws/lib/buffer-util.js
@ ./node_modules_dev/engine.io-client/node_modules/ws/lib/sender.js
@ ./node_modules_dev/engine.io-client/node_modules/ws/index.js
@ ./node_modules_dev/engine.io-client/lib/transports/websocket.js
@ ./node_modules_dev/engine.io-client/lib/transports/index.js
@ ./node_modules_dev/engine.io-client/lib/socket.js
@ ./node_modules_dev/engine.io-client/lib/index.js
@ ./node_modules_dev/socket.io-client/lib/manager.js
@ ./node_modules_dev/socket.io-client/lib/index.js
@ ./node_modules_dev/@uppy/transloadit/lib/Assembly.js
@ ./node_modules_dev/@uppy/transloadit/lib/index.js
@ ./node_modules_dev/babel-loader/lib??ref--2-0!./node_modules_dev/@nuxt/components/dist/loader.js??ref--0-0!./node_modules_dev/vue-loader/lib??vue-loader-options!./components/wimj-uppy.vue?vue&type=script&lang=js&
@ ./components/wimj-uppy.vue?vue&type=script&lang=js&
@ ./components/wimj-uppy.vue
@ ./components/post/post-create-text-post.vue
@ ./.nuxt/components/plugin.js
@ ./.nuxt/index.js
@ ./.nuxt/server.js
@ multi ./node_modules_dev/@nuxt/components/lib/installComponents.js ./.nuxt/server.js
WARNING in ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in '/home/ubuntu/git/wimj-website2/node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib'
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/buffer-util.js
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/receiver.js
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/index.js
@ ./node_modules_dev/subscriptions-transport-ws/dist/server.js
@ ./node_modules_dev/subscriptions-transport-ws/dist/index.js
@ ./node_modules_dev/vue-cli-plugin-apollo/graphql-client/src/index.js
@ ./.nuxt/apollo-module.js
@ ./.nuxt/index.js
@ ./.nuxt/server.js
@ multi ./node_modules_dev/@nuxt/components/lib/installComponents.js ./.nuxt/server.js
WARNING in ./node_modules_dev/engine.io-client/node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/home/ubuntu/git/wimj-website2/node_modules_dev/engine.io-client/node_modules/ws/lib'
@ ./node_modules_dev/engine.io-client/node_modules/ws/lib/validation.js
@ ./node_modules_dev/engine.io-client/node_modules/ws/lib/sender.js
@ ./node_modules_dev/engine.io-client/node_modules/ws/index.js
@ ./node_modules_dev/engine.io-client/lib/transports/websocket.js
@ ./node_modules_dev/engine.io-client/lib/transports/index.js
@ ./node_modules_dev/engine.io-client/lib/socket.js
@ ./node_modules_dev/engine.io-client/lib/index.js
@ ./node_modules_dev/socket.io-client/lib/manager.js
@ ./node_modules_dev/socket.io-client/lib/index.js
@ ./node_modules_dev/@uppy/transloadit/lib/Assembly.js
@ ./node_modules_dev/@uppy/transloadit/lib/index.js
@ ./node_modules_dev/babel-loader/lib??ref--2-0!./node_modules_dev/@nuxt/components/dist/loader.js??ref--0-0!./node_modules_dev/vue-loader/lib??vue-loader-options!./components/wimj-uppy.vue?vue&type=script&lang=js&
@ ./components/wimj-uppy.vue?vue&type=script&lang=js&
@ ./components/wimj-uppy.vue
@ ./components/post/post-create-text-post.vue
@ ./.nuxt/components/plugin.js
@ ./.nuxt/index.js
@ ./.nuxt/server.js
@ multi ./node_modules_dev/@nuxt/components/lib/installComponents.js ./.nuxt/server.js
WARNING in ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/home/ubuntu/git/wimj-website2/node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib'
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/validation.js
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/lib/receiver.js
@ ./node_modules_dev/subscriptions-transport-ws/node_modules/ws/index.js
@ ./node_modules_dev/subscriptions-transport-ws/dist/server.js
@ ./node_modules_dev/subscriptions-transport-ws/dist/index.js
@ ./node_modules_dev/vue-cli-plugin-apollo/graphql-client/src/index.js
@ ./.nuxt/apollo-module.js
@ ./.nuxt/index.js
@ ./.nuxt/server.js
@ multi ./node_modules_dev/@nuxt/components/lib/installComponents.js ./.nuxt/server.js
ℹ Ready to run nuxt start 11:51:38
ℹ Nuxt build took: 117479.676443 ms 11:51:39
----------------- Install dependencies ----------------- 11:51:39
Error! Cannot find module '@nuxt/core/package.json'
Require stack:
- /home/ubuntu/git/wimj-website2/noop.js
If I add “bufferutil” and “utf-8-validate” to the package.json I keep getting the cannot find module error.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
node.js - FATAL ERROR: invalid array length Allocation failed
ANSWER: I managed to solve it, I had an infinite loop working in the background as @alfasin suggested.
Read more >FATAL ERROR: invalid array length Allocation failed ... - GitHub
FATAL ERROR : invalid array length Allocation failed - JavaScript heap ... failed - JavaScript heap out of memory", "trigger": "FatalError", ...
Read more >FATAL ERROR: invalid array length Allocation failed
I got the following error while I implemented D way heap. ... invalid array length Allocation failed - JavaScript heap out of memory...
Read more >RangeError: invalid array length - JavaScript - MDN Web Docs
The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds ...
Read more >FATAL ERROR: invalid array length Allocation failed
I tried to run node --max-old-space-size=4096 app. js # Increase limit to 4GB (as my server memory) but it's not recognizing this command...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I do not have the time right now to write a proper issue, but running the standalone build and looking at the files should show the problem.
I think how I came to the conclusion that something might be wrong in nuxt was by looking at this line: https://github.com/nuxt/nuxt.js/blob/2ec62617ced873fef97c73a6d7aa1271911ccfd5/packages/webpack/src/config/server.js#L63
The variable “_minifyServer” doesn’t seem to exist so I assumed this:
minimizer: _minifyServer ? this.minimizer() : []
always evaluates to [].I am of course not very familiar with the nuxt internals but I hope it helps
You’re quite right, we don’t normally minify the server as the space savings isn’t normally worth it on server-side code. If you’re encountering this issue, feel free to use
build._minifyServer: true
though note that this is not a supported API.