TypeError: Cannot read property 'tagName' of null
See original GitHub issueI created React app by using npx create-react-app i then run npm run eject to add @svgr/webpack follow the docs i changed webpack.config.js file to
{
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.svg$/],
use: [{
loader: '@svgr/webpack',
options: {
limit: imageInlineSizeLimit,
name: 'static/media/[name].[hash:8].[ext]',
}
},
{
loader: 'url-loader'
}]
},
NotFoundPage component
import React from 'react';
import { ReactComponent as NotFound } from '../assets/images/404.svg';
/** @jsx jsx */ import { jsx, css } from '@emotion/core';
export default function PageNotFound() {
return <div css={{
width: '100vw',
height: '100vh',
overflow: 'auto',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
<NotFound/>;
</div>
}
It was working perfectly at the time. Day after I back run the project again and the error is shown in the command
./src/assets/images/404.svg (./node_modules/@svgr/webpack/lib?-svgo,+titleProp,+ref!./src/assets/images/404.svg) TypeError: Cannot read property ‘tagName’ of null
Have anyone had encountered this problem? and how to fix it? Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Cannot read property 'tagName' of null #12830 - vercel/next.js
My issue was/is relevant to how I was handling callbacks. I thought it was because of the script tag too, but it wasn't....
Read more >Uncaught TypeError: Cannot read property 'tagName' of null
I have this error on Chrome for Linux and it was caused by the ImageBlocker extension. Since this "error" occurs for you when...
Read more >Cannot read property 'tagName' of null throws at /jslibrary ...
When a custom event is created in a custom LWC component which is exposed in the Visualforce tab in Lightning Experience through Lightning...
Read more >[Multilingual Component] Cannot read property 'tagName' of null
When I try to load resource from file I get the error. Cannot read property 'tagName' of null. The json file is a...
Read more >Cannot read property 'tagName' of null" for custom events in ...
In this case, the event's 'target' property will evaluate to 'null'. Deploy these components to an org, using target lightning__RecordPage. ...
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 Free
Top 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
Outdated issue, I am sorry but it looks like it does not affect enough people to be solved. Please takes time to fix it by opening a PR if you are affected.
also encountering this.
From reading the file-loader release notes, adding this works for me in webpack config:
file-loader@5.0.2@svgr/webpack@5.0.1