You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import React from 'react'
import Moment from 'react-moment';
import 'moment/locale/fi';
export default class MyHeader extends React.Component {
render() {
const dateToFormat = '1976-04-19T12:59-0500';
return (<div>
<Moment locale="fi">{dateToFormat}</Moment>
</div>);
}
}
Yields an error:
ncaught TypeError: Cannot read property 'preparse' of null
at prepareConfig (from-anything.js?ede6:43)
at createFromConfig (from-anything.js?ede6:22)
at createLocalOrUTC (from-anything.js?ede6:109)
at createLocal (local.js?8ec1:4)
at hooks (hooks.js?38d9:6)
at Function.value (index.js?948d:1)
at t.value (index.js?948d:1)
at t.value (index.js?948d:1)
at eval (ReactCompositeComponent.js:347)
at measureLifeCyclePerf (ReactCompositeComponent.js:75)
No errors if I leave out the locale.
For the webpack config I'm using this definition to avoid the error
Module not found: Error: Can't resolve './locale'
The text was updated successfully, but these errors were encountered:
Example:
Yields an error:
No errors if I leave out the
locale
.For the webpack config I'm using this definition to avoid the error
The text was updated successfully, but these errors were encountered: