We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using react-nice-dates in react Typescript,it is work on local host but on deployment its showing error. `
21:33:17.966 | 21:33:17.966 | 5 | import { format } from 'date-fns' 21:33:17.967 | 6 | import { enGB } from 'date-fns/locale' 21:33:17.967 | > 7 | import { DateRangePickerCalendar, START_DATE } from 'react-nice-dates' 21:33:17.967 | | ^ 21:33:17.967 | 8 | import 'react-nice-dates/build/style.css' 21:33:17.967 | 9 | import { start } from 'repl'; 21:33:17.967 | 10 | const Search = () => { 21:33:17.988 | error Command failed with exit code 1.
The text was updated successfully, but these errors were encountered:
Here is a quick solution:
react-nice-dates.d.ts
declare module 'react-nice-dates' { export const START_DATE: string; export const END_DATE: string; }
tsconfig.json
include
{ ..., "include": [ ..., + "react-nice-dates.d.ts" ] }
Sorry, something went wrong.
START_DATE and END_DATE boil down to the strings endDate and startDate. Declare these at the top of your file and you should be good.
endDate
startDate
the same error !
No branches or pull requests
I am using react-nice-dates in react Typescript,it is work on local host but on deployment its showing error.
`
Type error: Module '"react-nice-dates"' has no exported member 'START_DATE'.
21:33:17.966 |
`21:33:17.966 | 5 | import { format } from 'date-fns'
21:33:17.967 | 6 | import { enGB } from 'date-fns/locale'
21:33:17.967 | > 7 | import { DateRangePickerCalendar, START_DATE } from 'react-nice-dates'
21:33:17.967 | | ^
21:33:17.967 | 8 | import 'react-nice-dates/build/style.css'
21:33:17.967 | 9 | import { start } from 'repl';
21:33:17.967 | 10 | const Search = () => {
21:33:17.988 | error Command failed with exit code 1.
The text was updated successfully, but these errors were encountered: