Closed SeriousM closed 8 years ago
Hi jhades, it would be very polite if you could at least tell me, that you don't have time to help me out. I really want to use your library but I don't know where the problem is.
Thnak you,.
Did you actually try running it in the browser? I personally am not too worried about these tsc errors.
The files aren't compiled by the tsc because of the errors, so I can't run it in the browser. But you're right, the target platform should be the browser.
I too get these errors but typescript will compile anyways. For me it works. So your example/build
directory remains empty?
As the documentation says: Just open a second console, goto your example
directory, type npm start
and open http://localhost:8080
in your browser.
Well, it does work, but to be honest, an error is something that's alerting... I'll try to fix the problem and send a PR then. Thanks for the help so far!
Well, the TypeScript transpiler emits all sort of semantic errors. I personally have given up trying to solve them in my projects. As soon as you have an external library without proper definition file… you are in hell :-)
On 8. Feb. 2016, at 12:10, Bernhard Millauer notifications@github.com wrote:
Well, it does work, but to be honest, an error is something that's alerting... I'll try to fix the problem and send a PR then. Thanks for the help so far!
— Reply to this email directly or view it on GitHub https://github.com/jhades/angular2-redux-store/issues/2#issuecomment-181311122.
we resolved the issue... the typescript compiler (tsc) is searching for the modules like node - searching in "node_modules" folders. @jhades is using jspm which violates that search pattern and therefore typescript is fucking around :) but systemjs is playing nice because of the config in the config.js file. Yep, it's hard to satisfy typescript for the analysis and the module-system after the transpilation -.- ...
How exactly did you resolve it?
On 8. Feb. 2016, at 13:44, Bernhard Millauer notifications@github.com wrote:
Closed #2 https://github.com/jhades/angular2-redux-store/issues/2.
— Reply to this email directly or view it on GitHub https://github.com/jhades/angular2-redux-store/issues/2#event-542867731.
By not using jspm. The problem is that tsc does not know anything about jspm, it only knows how to resolve node modules like this and that. By using jspm you hide the node modules from tsc and then you get the errors.
Thats my .tsconfig, systemjs config, and the usage of the redux which works fine now.
Or simply using both… I recently tried JSPM and I think it is great!
On 8. Feb. 2016, at 17:32, Bernhard Millauer notifications@github.com wrote:
By not using jspm. The problem is that tsc does not know anything about jspm, it only knows how to resolve node modules like this https://github.com/Microsoft/TypeScript/issues/2338 and that https://nodejs.org/api/modules.html#modules_all_together. By using jspm you hide the node modules from tsc and then you get the errors.
Thats my .tsconfig https://github.com/SeriousM/BugTracker/blob/ea18550b7ce2b4bde20a4a7d04725589616e863e/BugTracker.App/tsconfig.json, systemjs config https://github.com/SeriousM/BugTracker/blob/ea18550b7ce2b4bde20a4a7d04725589616e863e/BugTracker.App/Static/app/system.test.js, and the usage of the redux https://github.com/SeriousM/BugTracker/blob/ea18550b7ce2b4bde20a4a7d04725589616e863e/BugTracker.App/Static/app/stores/userStore.ts which works fine now.
— Reply to this email directly or view it on GitHub https://github.com/jhades/angular2-redux-store/issues/2#issuecomment-181424628.
And how does typescript plays together with jspm?
According to this post it should work if you are adding the npm and jspm packages: http://www.mario-brendel.com/angular2-setup/2016/01/28/Angular2_Jspm_Setup_Part1/ http://www.mario-brendel.com/angular2-setup/2016/01/28/Angular2_Jspm_Setup_Part1/
However, I’m using VS Code and I get loads of highlighting errors etc. They wait for JSPM to become more stable to add support in tsc: https://github.com/Microsoft/TypeScript/issues/6012 https://github.com/Microsoft/TypeScript/issues/6012
One piece of advice: when using angular2-redux-store
make sure you fix the implementation!!! The dispatch
and the subscribe
methods need to RETURN the native store methods. Otherwise you will be in hell with async actions and you cannot unsubscribe onDestroy
.
On 8. Feb. 2016, at 22:38, Bernhard Millauer notifications@github.com wrote:
And how does typescript plays together with jspm? — Reply to this email directly or view it on GitHub https://github.com/jhades/angular2-redux-store/issues/2#issuecomment-181565301.
fixed, added the returns in 1.2.0 available in npm.
According to this post it should work if you are adding the npm and jspm packages
Obvious, because systemjs does the resolving of the required files but that does not solve the typescript-errors problem.
They wait for JSPM to become more stable to add support in tsc
Thats great news, but until then I'll stay with systemjs and plain node :)
fixed, added the returns in 1.2.0 available in npm.
Great, thank you!! :) Just noticed yesterday that subscribe does not return anything which was wrong
Hi! I read your post about angular2, redux, immutable and I was keen to try it out! I tried to reference the angular2-redux-store as you've wrote in the readme, but typescript is constantly telling me, that it's unable to find the module, even it exists in the node_modules folder.
I thought I will try your example, because that one has to work, right? Nope, sorry, it doesn't.
Thats the output after starting the example as documented in your readme:
I'm using windows 10 with a cygwin shell.
Do you know what's the problem is?
Thank you, Bernhard