GithubHelp home page GithubHelp logo

Comments (17)

pouyada avatar pouyada commented on June 12, 2024 2

Same Warning

from ngx-restangular.

lweinheimer avatar lweinheimer commented on June 12, 2024 2

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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024 1

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.

jaydiablo avatar jaydiablo commented on June 12, 2024

This appears to be a duplicate of #179

from ngx-restangular.

Xepe avatar Xepe commented on June 12, 2024

I got the same warning using angular 9.1.4

from ngx-restangular.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

Still no solution ?

from ngx-restangular.

pouyada avatar pouyada commented on June 12, 2024

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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

@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.

pouyada avatar pouyada commented on June 12, 2024

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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

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.

rshchpkn avatar rshchpkn commented on June 12, 2024

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.

pouyada avatar pouyada commented on June 12, 2024

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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

I always have this error in Angular 10:
ERROR : Cannot instantiate cyclic dependency! Restangular

from ngx-restangular.

pouyada avatar pouyada commented on June 12, 2024

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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

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.

pouyada avatar pouyada commented on June 12, 2024

@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.

BehnooshShiva avatar BehnooshShiva commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.