-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
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
Namespace 'i18next' has no exported member 'TranslationFunction' #295
Comments
Ok, this errors are in module /node_modules/aurelia-i18n/dist/aurelia-i18n.d.ts the breaking change is:
|
@ProtechAutomation Cool, thanks for the finding. The definition was built with v11 or 12 I think, and newer version of i18next will probably requires some updates from i18next plugin. It should not be difficult to do so though. Would be nice if you could create a PR to fix this |
Will try. I have never done this (PR). |
@ProtechAutomation You can follow the instruction for development in |
Hmm...
So now i get new problems in:
Where first I had to make the type of defaultOptions explict, and remove 'compatibilityAPI: "v1"'. |
Ok, I think I found some way to fix this. I replaced the init line with this.i18next.createInstance() like this:
So far VS code does not show any errors in code. |
Ok,
I created a pull request for it: fix-for-295 |
Fix for #295, upgraded i18next to v14.0.1
Problem still exists. I installed aurelia-i18n yesterday, got 3.0.0-beta.5, and during build i get following 3 errors: Edit: aurelia-i18n.d.ts still contained old types in this lines. i have changed them to the types of the PR and the build errors have gone away. |
@zewa666 Any ideas? |
@mredl thats weird, can you check on a fresh new project what gets installed and whether the old types are present in the same d.ts file? |
i did! that was a fresh new project, created with cli on the same day. the first plugin i installed was aurelia-18n. Edit: i have tried it now on a different workstation, where no aurelia app has been coded before, there it works without troubles. it looks like npm has pulled some modules from local cache, that an older version of aurelia-i18n or dependency got installed |
@mredl oh wow that was super dumb mistake from our side :( We've forgot to release the latest version on npm and I was merely testing it from a local branch. Sorry for that. @EisenbergEffect can you create another patch release? |
I'll get a release out tonight 😄 |
@zewa666 I don't think I can release this yet. There seems to still be an issue. In the generated d.ts file for the library, there are two imports for i18next, with two different syntaxes. This makes the d.ts invalid. It also leads me to be believe that one of the imports, which isn't correct, is still used somewhere in the codebase. Can you investigate? You can see the issue if you build master and look at the generated d.ts. Let me know. |
* use the init method as intended (promise) * do not reject on 404 errors raised by the backend related issue #295
I'm submitting a bug report
3.0.0-beta.5
Please tell us about your environment:
Operating System:
Windows [10]
Node Version:
11.8.0
6.7.0
JSPM 0.16.32 | webpack 2.1.0-beta.17
Browser:
all
Language:
TypeScript 3.1.2
Current behavior:
On 'au build' it throws errors:
error TS2694: Namespace 'i18next' has no exported member 'TranslationFunction'
error TS2694: Namespace 'i18next' has no exported member 'TranslationOptions'
Expected/desired behavior:
What is the expected behavior?
The expected behavior is to successfuly compile.
What is the motivation / use case for changing the behavior?
The text was updated successfully, but these errors were encountered: