Getting build error unable to import provide from @angular/core RC6
See original GitHub issueI created an app.config.ts file in which I create application config variables. For, this I import OpaqueToken and provide. It was working fine till RC5 but after updating to RC6 I am unable to import provide from @angular/core
import { OpaqueToken, provide } from '@angular/core';
export const APP_CONFIG = new OpaqueToken('config');
const dictionary = {
apiUrl: 'dummy/api',
};
export const APPCONFIG_PROVIDERS = [
provide(APP_CONFIG, { useValue: dictionary })
]
Build Error:
Severity Code Error TS2305 Module ‘“/node_modules/@angular/core/index”’ has no exported member ‘provide’.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Getting a module not found error only when building for prod
Found the issue, the import in the app module for my custom error handler was missing the braces... import CustomErrorHandler from '.
Read more >Providing dependencies in modules - Angular
A provider is an instruction to the Dependency Injection system on how to obtain a value for a dependency. Most of the time,...
Read more >Upgrading from AngularJS to Angular
Correspondingly, when you upgrade an AngularJS component and use it from Angular, all the bindings defined for scope (or bindToController ) of the...
Read more >NG0201: No provider for {token} found! - Angular
To fix the error ensure that your service is registered in the list of providers of an NgModule or has the @Injectable decorator...
Read more >48 answers on StackOverflow to the most popular Angular ...
Angular EXCEPTION: No provider for Http; Can't bind to 'formGroup' since it ... Importing lodash into angular2 + typescript application ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like it was deprecated in RC.5 & fully removed in RC.6
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.