question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VueJS Production Build - firstChild is null

See original GitHub issue
TypeError: "t.firstChild is null"
    getTemplateFromEl grapesjs-mjml.min.js:34
    getTemplateFromMjml grapesjs-mjml.min.js:34
    render grapesjs-mjml.min.js:34
    addToCollection grapes.min.js:3
    render grapes.min.js:3
    forEach grapes.min.js:2
    a/</t.prototype[i]</< grapes.min.js:2
    render grapes.min.js:3
    renderChildren grapes.min.js:2
    render grapes.min.js:2
    addToCollection grapes.min.js:3
    addTo grapes.min.js:3
    v grapes.min.js:2
    m grapes.min.js:2
    f grapes.min.js:2
    trigger grapes.min.js:2
    _onModelEvent grapes.min.js:2
    v grapes.min.js:2
    m grapes.min.js:2
    f grapes.min.js:2
    trigger grapes.min.js:2
    set grapes.min.js:2
    add grapes.min.js:2
    add grapes.min.js:2
    addComponent grapes.min.js:12
    setComponents grapes.min.js:12
    setComponents grapes.min.js:12
    setComponents grapes.min.js:12
    loadTemplate EmailComposer.vue:115
    documentSelector EmailComposer.vue:70
    VueJS 4
vue.runtime.esm.js:1888:12
    VueJS 7

Not sure why I am getting this error, I suspect the mjml imports. This only happens when I build for production Just get a blank, unusable frame. image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
DRoetcommented, Mar 5, 2020

Forking the repo and setting mode: development in the webpack config solved this issue for me, but increases the bundle size from 1.45mb -> 5mb. So there must be something happening in the minification process that causes this issue 😕

0reactions
DRoetcommented, Jul 17, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'firstChild' of null in vue js html? - Stack ...
My vue js code is addDiv = new Vue({ el: "#addDiv", ... Uncaught TypeError: Cannot read property 'firstChild' of null at Object._.
Read more >
Application API - Vue.js
Details. The argument can either be an actual DOM element or a CSS selector (the first matched element will be used). Returns the...
Read more >
How To Use Vue.js Environment Modes with a Node.js Mock ...
The project that is generated for you from Vue CLI has these commands pre-mapped to npm run serve , npm run test:unit ,...
Read more >
Vue Js and production builds - Francium Tech
Vue.js is an open-source progressive JavaScript framework for building user ... To preview the production build locally using the serve NPM package:
Read more >
Cannot read property 'firstChild' of null in vue js html?
Coding example for the question Google Map Uncaught TypeError: Cannot read property 'firstChild' of null in vue js html?-Vue.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found