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
I'm trying to use this package with my Typescript + React app -- it seems super awesome! Unfortunately, I get compiler errors when including it 😢
TypeScript error in [...]/node_modules/chrono-node/dist/index.d.ts(32,10):
'from' expected. TS1005
30 | PM = 1
31 | }
> 32 | export * as de from "./locales/de";
| ^
33 | export * as en from "./locales/en";
34 | export * as fr from "./locales/fr";
35 | export * as ja from "./locales/ja";
I tried changing the node version to 12.x, the chrono version to 1.x, and the react-scripts version to 3.4.0, but none of those worked. If necessary, I can create a minimal reproducible example, but I'm hoping this is an easy fix 🤞
The text was updated successfully, but these errors were encountered:
Thank you for your quick response! I had tried something similar with no success, and upon updating I get this error message:
TypeError: chrono_node__WEBPACK_IMPORTED_MODULE_3___default.a is undefined
> 8 | const result = chrono.parse(input, new Date(), {
9 | forwardDate: true,
10 | });
So I tried digging a bit more, and I think the issue had to do with me trying to access result[0] before there was any input to parse. Additionally, I was trying to import in a way that didn't work. I tried a bunch of different syntaxes, and for some reason now the `import * as chrono from 'chrono-node' seems to be working, even though it wasn't before. If I can reproduce the issue, I'll re-open it.
Thank you so much for your time, I'm glad this was resolvable!
I'm trying to use this package with my Typescript + React app -- it seems super awesome! Unfortunately, I get compiler errors when including it 😢
I thought this was related to this issue, but apparently this has been a feature since 2018. I'm concerned that this is an issue with react-scripts or my tsconfig.json.
Here's what I'm working with:
I tried changing the node version to 12.x, the chrono version to 1.x, and the react-scripts version to 3.4.0, but none of those worked. If necessary, I can create a minimal reproducible example, but I'm hoping this is an easy fix 🤞
The text was updated successfully, but these errors were encountered: