question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular CLI cannot compile

See original GitHub issue

The line export const options: Partial<IConfig> | (() => Partial<IConfig>); from the instructions is flagged as an error, and compilation fails:

ERROR in src/app/web/inputfields/inputfields.module.ts(9,14): error TS1155: 'const' declarations must be initialized.
src/app/web/inputfields/inputfields.module.ts(9,31): error TS2304: Cannot find name 'IConfig'.
src/app/web/inputfields/inputfields.module.ts(9,57): error TS2304: Cannot find name 'IConfig'.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

13reactions
visurelcommented, Jun 6, 2019

@smlombardi You’ll need to import the IConfig from the ngx-mask module and set it to some initial value, because it’s a const so:

import { IConfig } from 'ngx-mask';
export const options: Partial<IConfig> | (() => Partial<IConfig>) = {};
2reactions
smlombardicommented, Jun 6, 2019

Now I get

Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[MaskService -> InjectionToken config]: StaticInjectorError(Platform: core)[MaskService -> InjectionToken config]: NullInjectorError: No provider for InjectionToken config! http://localhost:8082/vendor.js:69627:28 resolveToken@http://localhost:8082/vendor.js:69872:27 tryResolveToken@http://localhost:8082/vendor.js:69816:28 http://localhost:8082/vendor.js:69713:35 resolveToken@http://localhost:8082/vendor.js:69872:27 tryResolveToken@http://localhost:8082/vendor.js:69816:28 http://localhost:8082/vendor.js:69713:35 resolveNgModuleDep@http://localhost:8082/vendor.js:81853:32 resolveNgModuleDep@http://localhost:8082/vendor.js:81853:32 resolveNgModuleDep@http://localhost:8082/vendor.js:81853:32 createClass@http://localhost:8082/vendor.js:82793:42 createViewNodes@http://localhost:8082/vendor.js:83877:58 callViewAction@http://localhost:8082/vendor.js:84206:28 execComponentViewsAction@http://localhost:8082/vendor.js:84125:27 createViewNodes@http://localhost:8082/vendor.js:83918:29 createRootView@http://localhost:8082/vendor.js:83804:20 callWithDebugContext@http://localhost:8082/vendor.js:84812:30 http://localhost:8082/vendor.js:82143:43 http://localhost:8082/vendor.js:82254:51 http://localhost:8082/vendor.js:142629:55 http://localhost:8082/vendor.js:139876:52 http://localhost:8082/vendor.js:139827:33 forEach@[native code] http://localhost:8082/vendor.js:139826:36 http://localhost:8082/vendor.js:139883:41 http://localhost:8082/vendor.js:139827:33 forEach@[native code] http://localhost:8082/vendor.js:139826:36 http://localhost:8082/vendor.js:139883:41 http://localhost:8082/vendor.js:139827:33 forEach@[native code] http://localhost:8082/vendor.js:139826:36 http://localhost:8082/vendor.js:139843:41 http://localhost:8082/vendor.js:139827:33 forEach@[native code] http://localhost:8082/vendor.js:139826:36 http://localhost:8082/vendor.js:139751:33 http://localhost:8082/vendor.js:139735:22 http://localhost:8082/vendor.js:218440:39 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:221164:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:218446:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:220803:30 http://localhost:8082/vendor.js:212373:31 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:218446:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:215333:24 http://localhost:8082/vendor.js:212535:35 http://localhost:8082/vendor.js:212521:35 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:220782:115 http://localhost:8082/vendor.js:220772:23 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:220803:30 http://localhost:8082/vendor.js:212373:31 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:218446:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:221164:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:218730:30 http://localhost:8082/vendor.js:212373:31 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:218446:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:220970:33 http://localhost:8082/vendor.js:213166:27 http://localhost:8082/vendor.js:213184:34 http://localhost:8082/vendor.js:213166:27 http://localhost:8082/vendor.js:218725:38 http://localhost:8082/vendor.js:213166:27 http://localhost:8082/vendor.js:223831:32 http://localhost:8082/vendor.js:212535:35 http://localhost:8082/vendor.js:212521:35 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:218720:90 http://localhost:8082/vendor.js:218714:23 http://localhost:8082/vendor.js:218697:26 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:221164:30 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:215333:24 http://localhost:8082/vendor.js:212535:35 http://localhost:8082/vendor.js:212521:35 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:212516:26 http://localhost:8082/vendor.js:220782:115 http://localhost:8082/vendor.js:220772:23 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:217885:34 http://localhost:8082/vendor.js:213154:23 http://localhost:8082/vendor.js:221164:30
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI project failed to compile - node.js - Stack Overflow
Uninstall Node by using an app cleaner eg IObit Uninstaller Pro (The pro version will delete all folders associated with node eg npm,...
Read more >
cannot build · Issue #21399 · angular/angular-cli - GitHub
It looks like the primary issue here is that @angular/compiler-cli is being included in the bundle. That is a Node only package that...
Read more >
Angular compiler options
When you use ahead-of-time compilation (AOT), you can control how your application is compiled by specifying template compiler options in the TypeScript ...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
This error occurs when the Angular CLI cannot find a project to execute against. Fortunately, this error is often very easy to resolve....
Read more >
@angular/compiler-cli - npm
Angular - the compiler CLI for Node.js. Latest version: 15.0.4, last published: 12 days ago. Start using @angular/compiler-cli in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found