-
-
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
Problem with importing/compiling i18n and Backend in skeleton project #136
Comments
UPDATE** I am new to Aurelia, but am not new to JavaScript or JS frameworks. What I've done is to first install the Aurelia skeleton project for Typescript-Webpack, and then install the aurelia-i18n package according to its README. Then, I saw the compilation errors I posted above. I then spent several days trying to discover what was necessary to eliminate the errors, by reading some obscure bug reports in the underlying i18n project on GitHub. Eventually, by manually downloading/copying some typings files, and trial and error of determining where to place the files, I have eliminated the initial compilation problem that was triggered by importing the 'aurelia-i18n' package. The compilerOptions notes posted above were not the solution. However, when I try to set the configuration in the Aurelia main.ts file, using this code - [code]
[/code]
First, I get an error in the JS console that the aurelia-i18n package can't be found, triggered by the code .plugin('aurelia-i18n', (instance): DEBUG [aurelia] Loading plugin aurelia-i18n. Second, if I then add the import for the xhr-backend, with either of these -
Again, I've followed the instructions exactly in the various READMEs, and started with the Aurelia-provided skeleton project. Once again, any help or solutions are appreciated. Thanks, |
I am having a similar problem with a TypeScript project. Was working until I installed aurelia-i18n following the instructions. Now, build fails with the error message: If you find a solution, please let us know. Full disclosure: I hit a previous problem introduced by aurelia-i18n, which I resolved with a simple change to .\typings\modules\aurelia-validatejs\index.d.ts : |
Her is an working typescript-webpack project with aurelia-i18n: https://github.com/Ullfis/i18n-aurelia-typescript-webpack Typings used (custom_typings/custom.d.ts):
|
After updating to aurelia-18n v1.1.1, this is now failing:
|
Can you somehow create a zip or upload your example to github, excluding the jspm/node folder, so that we can try to replicate your issue? |
As noted here: and here: This happens with the out-of-the-box typescript-webpack skeleton, as soon as the aurelia-i18n module is added. There is no need for creating a special repository, this can be reproduced by using the skeleton + i18n. The previously-suggested change for typings noted above (#136 (comment)) worked when using aurelia-i18n@1.0.0. Yesterday, I upgraded to aurelia-i18n@1.1.0, and I started seeing the error:
|
Also please note: aurelia/skeleton-navigation#628 (comment) |
Seems to be related to changes from these lines of dist/aurelia-i18n.d.ts:
to this:
which are now making reference to a type of
Is this correct? |
Did I mention already that I hate TypeScript? :) |
Thank you. Please post a comment when this is fixed, as it has currently broken my application, preventing it from running. Thanks, |
fixes wrong return type information of setup and i18nextReady methods fixes issue #136 (comment)
@don-bluelinegrid I'm sorry about that. I've already pushed the fix, just want to wait to include the active PR and will get a patch release out. |
Thanks. |
I'm submitting a bug report
1.0.0-rc.1.0.0
Please tell us about your environment:
OSX 10.11.5
v4.4.7
3.10.3
TypeScript
Current behavior:
I am new to Aurelia, setting up an environment for a new commercial product project. When I follow the aurelia-i18n ReadMe, I get the following problems:
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/typings/globals/i18next-xhr-backend.d.ts:22:29
Generic type 'Array' requires 1 type argument(s).
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/typings/globals/i18next-xhr-backend.d.ts:22:48
Generic type 'Array' requires 1 type argument(s).
Typescript compilation problem What is the purpose/status of this repository? #2, with the recommended additions to tsconfig.json, i.e., added this -
"filesGlob": [
"./typings/browser.d.ts", // this must be specified in case you use typings(https://github.com/typings/typings)
"./typings/*/.d.ts" // if you use both typings files from this repository (
doc/*.d.ts
)]
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/node_modules/aurelia-fetch-client/dist/aurelia-fetch-client.d.ts:73:42
Cannot find name 'URLSearchParams'.
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/src/login.ts:12:28
Cannot find name 'System'.
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/src/users.ts:10:28
Cannot find name 'System'.
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/typings/globals/118next/i18next-xhr-backend.d.ts:22:29
Generic type 'Array' requires 1 type argument(s).
ERROR in [default] /Users/donpeterkofsky/Documents/gc-2/typings/globals/118next/i18next-xhr-backend.d.ts:22:48
Generic type 'Array' requires 1 type argument(s).
I copied the type definition files from the i18next GitHub, 2.0.0 branch.
The above errors are seen without even including import statements in my code like:
import * as I18N from 'aurelia-i18n';
import * as Backend from 'i18next-xhr-backend';
Is there something else I've missed, or any suggestions for resolving this?
Thanks.
The text was updated successfully, but these errors were encountered: