Closed beleta closed 5 years ago
Just wanted to report the same issue. can confirm it and that the solution works for me
Having the same issue, would love to see the commit deployed ASAP
@beleta can you make a PR for your commit?
@beleta can you make a PR for your commit?
Done.
having the same issue
@beleta can you make a PR for your commit?
Done.
When will this PR would be merged? I am kind of stuck while transition to Angular7
Same here...
I had the same problem. I decided to do a minor hack using the post-install script.
package.json
"scripts": {
"postinstall": "bash ./fix-ngx-store.sh"
}
fix-ngx-store.sh
#!/bin/bash
echo '***Temporarily fix the ngx store. Until the PR is merged.'
sed -i '$ icomposedPath(): EventTarget[];' node_modules/ngx-store/src/utility/storage/storage-event.d.ts
sed -i '/oldValue?: any;/c\oldValue: any' node_modules/ngx-store/src/utility/storage/storage-event.d.ts
Might be worth just forking and pushing the full build to Github temporarily, then using a npm reference to the Github branch.
I've upgraded the project to Angular 7 in my own fork. This includes the change from @beleta, as well as some other changes to fix the build (e.g no longer relevant properties of NgxStorageEvent). You can use the following as a dependency if you wish to use this:
"ngx-store": "mtraynham/ngx-store#angular_7_build"
Relevant changes are on the angular_7 branch. The angular_7_build
branch, just publishes the dist directory Github so it can be downloaded by NPM (or Yarn).
One thing to note, I had to lock "@types/node" to 10.11.6
, to prevent a different issue with ts-debug, also owned by our friend @DanielKucal. Hopefully he pops up soon enough.
For now, I'll leave the fork up until he get's back, or feel free to fork mine and use your own Github namespace ("ngx-build": "<your-username>/ngx-store#angular_7_build"
).
Good afternoon,
ng serve throw following error after upgrading to angular 7:
ERROR in node_modules/ngx-store/src/utility/storage/storage-event.d.ts(1,22): error TS2420: Class 'NgxStorageEvent' incorrectly implements interface 'StorageEvent'.
Property 'composedPath' is missing in type 'NgxStorageEvent'.
How to resolve?
Thank you very much.
@aleperfetti81 , see https://github.com/zoomsphere/ngx-store/issues/66#issuecomment-434385463
@aleperfetti81 , see #66 (comment)
Thanks for the response. Can you please tell me where should i insert that dependency? I've been using angular recently and I'm a bit inexperienced about these things
Yeah in your package.json
file just replace:
"dependencies": {
"ngx-store": "^2.0.0",
}
with:
"dependencies": {
"ngx-store": "mtraynham/ngx-store#angular_7_build",
}
or fork my ngx-store repo to your own repo, and reference your fork instead:
"dependencies": {
"ngx-store": "aleperfetti81/ngx-store#angular_7_build",
}
You shouldn't need to change anything else, it's basically just upgrading the dependency.
"ngx-store": "mtraynham/ngx-store#angular_7_build"
Thank you very much. You saved my day @mtraynham
@mtraynham Hey, I'm also a bit new to npm and ngx. But I followed your instructions and it works nice. However everytime I install a new package with npm, for some reason ngx-store is removed, so I have to call npm i ngx-store --save
again or I'll just get stuck with a bunch of errors saying ngx-store can't be resolved.
Did I do something wrong or?
A new version has been released, mainly thanks to @timn. npm i ngx-store@latest --save
should fix your problems. Please let me know if it does not.
Thanks! Doesn't show up in Github, yet. Forgot to push the tag?
I get this error when using Angular 7: