Comments (17)
Same Warning
from ngx-restangular.
Angular 10 (typescript 3.9.6) generates the following:
ERROR in node_modules/ngx-restangular/lib/ngx-restangular.module.d.ts:8:97 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s)
from ngx-restangular.
same warning :
Warning: Entry point 'ngx-restangular' contains deep imports into 'C:/../node_modules/core-js/features/object'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
And when i run my project
ERROR : Cannot instantiate cyclic dependency! Restangular
from ngx-restangular.
This appears to be a duplicate of #179
from ngx-restangular.
I got the same warning using angular 9.1.4
from ngx-restangular.
Still no solution ?
from ngx-restangular.
There is no any new release of Restangular yet, so no solution. Anyway I got only a warning and everything works fine.
from ngx-restangular.
@pouyada
I have an error :
ERROR : Cannot instantiate cyclic dependency! Restangular
Can you tell me which version you use (Angular / Restangular) ?
Thank you
from ngx-restangular.
Here are my dependencies.
Please make sure you don't have any circular dependency on your own code.
"dependencies": {
"@angular/animations": "^9.1.2",
"@angular/cdk": "^9.2.1",
"@angular/common": "~9.1.2",
"@angular/compiler": "~9.1.2",
"@angular/core": "~9.1.2",
"@angular/flex-layout": "^9.0.0-beta.29",
"@angular/forms": "~9.1.2",
"@angular/localize": "^9.1.2",
"@angular/material": "^9.2.1",
"@angular/material-moment-adapter": "^9.2.1",
"@angular/platform-browser": "^9.1.2",
"@angular/platform-browser-dynamic": "^9.1.2",
"@angular/router": "~9.1.2",
"core-js": "^3.6.5",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"jwt-decode": "^2.2.0",
"material-design-icons": "^3.0.1",
"moment": "^2.24.0",
"ngx-gallery-9": "^1.0.6",
"ngx-restangular": "^5.0.0",
"ngx-swiper-wrapper": "^9.0.1",
"ngx-webstorage-service": "^4.1.0",
"rxjs": "~6.5.5",
"rxjs-compat": "^6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
from ngx-restangular.
Hello,
I would like to know if the ngx-restangular library is no longer supported ?
I could not update angular on my project since angular 9.
Version 10 of Angular is available and i have a error :
`
ERROR in node_modules/ngx-restangular/lib/ngx-restangular.module.d.ts:8:97 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).
tatic forRoot(providers?: any[], configFunction?: (provider: any, ...arg: any[]) => void): ModuleWithProviders;`
You can please tell me if you no longer support this library so that I can find another solution ?
from ngx-restangular.
Hi! New version was released. Core-js library wasn't removed for now but all other issues should be resolved. Please let us know if
ERROR : Cannot instantiate cyclic dependency! Restangular
error is still present
from ngx-restangular.
There is no any error however the warning persists.
Entry point 'ngx-restangular' contains deep imports into 'C:/../project-dir/node_modules/core-js/features/object'.
This is probably not a problem, but may cause the compilation of entry points to be out of order.
from ngx-restangular.
I always have this error in Angular 10:
ERROR : Cannot instantiate cyclic dependency! Restangular
from ngx-restangular.
I always have this error in Angular 10:
ERROR : Cannot instantiate cyclic dependency! Restangular
I think you are using it in a wrong way. please share the piece of code where you are importing and using Restangular.
from ngx-restangular.
I have been using it for about 2 years. I had no problem before Angular 9.
app.module.ts :
import { RestangularModule } from 'ngx-restangular';
import { RestangularConfigFactory } from '../app/core/restangular.config';
imports: [....,,RestangularModule.forRoot([my services], RestangularConfigFactory),....
RestangularConfigFactory :
export function RestangularConfigFactory(RestangularProvider, mes services) {
RestangularProvider.setBaseUrl(...)
RestangularProvider.setPlainByDefault(true);
RestangularProvider.setDefaultHeaders({
'Content-Type': 'application/json'
});
RestangularProvider.addFullRequestInterceptor(() => {...
RestangularProvider.addErrorInterceptor((response) => {...
ex in a services:
import { Restangular } from 'ngx-restangular';
constructor(private restangular: Restangular) {}
getAbout(): Observable {
return this.restangular.one(ABOUT_RESOURCE_URL)
.withHttpConfig({timeout: timeout})
.get();
}
from ngx-restangular.
@BehnooshShiva make sure none of your services here:
imports: [....,,RestangularModule.forRoot([my services], RestangularConfigFactory),....
have a dependency to restangular.
then in your service:
constructor(private restangular: Restangular) {}
try to use restangular as public
from ngx-restangular.
Make sure none of your services here !
It is a complex project and all the messages, error messages, localstorage and etc managed by services.
It is mandatory to use services in RestangularConfigFactory
from ngx-restangular.
Related Issues (20)
- How to send array in Request Payload ? HOT 1
- PUT on a sub-property of an element HOT 2
- Error npm install with git branch HOT 6
- Custom headers emptying the headers map HOT 1
- Not working with Angular 8 HOT 1
- Remove deep import of core.js 3 HOT 2
- Support type defintions for ngx-restangular HOT 1
- Integrate HTTP_INTERCEPTORS of Angular as FullRequestInterceptors
- Define dependencies in package.json?
- Should `@types/lodash` be a non-dev dependency? HOT 1
- Why was use of HttpClient explicitly removed? HOT 2
- Enhance support for getMethodOverride in getList function HOT 3
- set default headers after login HOT 1
- Should it add query string to route? HOT 2
- Is this project still being maintained? HOT 2
- AuthService Code
- Uncaught Error: Type RestangularModule does not have 'ɵmod' property. HOT 1
- ngx-restangular still being maintained? Community fork? HOT 1
- The bug in defaultResponseInterceptor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-restangular.