Production Error:Cannot read property 'insertBefore' of null
Version
3.1.1
Reproduction link
preview: http://datav.pengxiaotian.com/#/project code: https://github.com/pengxiaotian/datav-vue/blob/main/src/views/my-project/index.vue#L106
Steps to reproduce
use vite 2.3.7
- yarn build
- yarn serve
What is expected?
What is actually happening?
Current code:
const group = computed(() => ProjectModule.group)
const ungroup = computed(() => ProjectModule.ungroup)
const groups = computed(() => ProjectModule.groups)
I try to change it to the under code is right:
const group = ref(ProjectModule.group)
const ungroup = ref(ProjectModule.ungroup)
const groups = ref(ProjectModule.groups)
I use sourcemap in build: // vite.config.ts
{
build: {
sourcemap: 'inline'
}
}
output:
<--- Last few GCs --->
[26410:0x106100000] 58372 ms: Scavenge 2033.6 (2058.2) -> 2025.9 (2058.2) MB, 3.1 / 0.0 ms (average mu = 0.161, current mu = 0.094) allocation failure
[26410:0x106100000] 59809 ms: Mark-sweep 2033.8 (2058.7) -> 2025.9 (2059.2) MB, 1420.5 / 0.0 ms (average mu = 0.097, current mu = 0.023) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10130d6e5 node::Abort() (.cold.1) [/Users/pengxiaotian/.nvm/versions/node/v14.17.0/bin/node]
2: 0x1000b1c49 node::Abort() [/Users/pengxiaotian/.nvm/versions/node/v14.17.0/bin/node]
3: 0x1000b1daf node::OnFatalError(char const*, char const*) [/Users/pengxiaotian/.nvm/versio
...
Please read and follow https://new-issue.vuejs.org/?repo=vuejs/vue-next#why-repro in a new issue