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.

Cannot install module into existing angular-cli app

See original GitHub issue

I’ve tried both testing with npm install ang-select --save and it’s not registered with npm.

I also tried installing locally but running npm run build inside the project and using npm install “…/ang-select” --save and I get errors running the application:

core.es5.js:1020 ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'ang-select'.
1. If 'ang-select' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'ang-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
                    bindText="name"
                    [allowClear]="true"
                    [ERROR ->][(ngModel)]="selectedCity">
        </ang-select>
        
"): ng:///BlogPageModule/BlogPageComponent.html@9:20
Error: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'ang-select'.
1. If 'ang-select' is an Angular component and it has 'ngModel' input, then verify that it is part of this module.
2. If 'ang-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
                    bindText="name"
                    [allowClear]="true"
                    [ERROR ->][(ngModel)]="selectedCity">
        </ang-select>
        
"): ng:///BlogPageModule/BlogPageComponent.html@9:20
    at syntaxError (http://localhost:4200/vendor.bundle.js:21366:34)
    at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (http://localhost:4200/vendor.bundle.js:32478:19)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (http://localhost:4200/vendor.bundle.js:46523:39)
    at http://localhost:4200/vendor.bundle.js:46443:62
    at Set.forEach (native)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (http://localhost:4200/vendor.bundle.js:46443:19)
    at http://localhost:4200/vendor.bundle.js:46330:19
    at Object.then (http://localhost:4200/vendor.bundle.js:21356:156)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:4200/vendor.bundle.js:46329:26)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:4200/vendor.bundle.js:46258:37)
    at syntaxError (http://localhost:4200/vendor.bundle.js:21366:34)
    at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (http://localhost:4200/vendor.bundle.js:32478:19)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (http://localhost:4200/vendor.bundle.js:46523:39)
    at http://localhost:4200/vendor.bundle.js:46443:62
    at Set.forEach (native)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (http://localhost:4200/vendor.bundle.js:46443:19)
    at http://localhost:4200/vendor.bundle.js:46330:19
    at Object.then (http://localhost:4200/vendor.bundle.js:21356:156)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:4200/vendor.bundle.js:46329:26)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:4200/vendor.bundle.js:46258:37)
    at resolvePromise (http://localhost:4200/polyfills.bundle.js:3193:31)
    at resolvePromise (http://localhost:4200/polyfills.bundle.js:3164:17)
    at http://localhost:4200/polyfills.bundle.js:3241:17
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.bundle.js:2833:31)
    at Object.onInvokeTask (http://localhost:4200/vendor.bundle.js:51328:37)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.bundle.js:2832:36)
    at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (http://localhost:4200/polyfills.bundle.js:2600:47)
    at drainMicroTaskQueue (http://localhost:4200/polyfills.bundle.js:3005:35)
    at <anonymous>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hungerregnuhcommented, Jul 20, 2017

depending on your version of npm there may be issues with cli projects - https://github.com/angular/angular/issues/15763 the last several comments cover this pretty well.

as for npm link issues see: https://github.com/angular/angular-cli/wiki/stories-linked-library

@anjmao i used both your sample and the quickstart-lib to get a webpack version going as well as the integration app using the cli. If you’re ok with it and if i have some time i can make a PR with the integration app using the cli instead?

0reactions
anjmaocommented, Aug 11, 2017

@hungerregnuh I will update integration app to use angular-cli soon 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to install @angular/cli using npm - Stack Overflow
right click the windows button, click on command propmt (Admin) or windows power shell(Admin) depending on your windows version.
Read more >
Angular CLI can't find modules from locally installed library.
If I open both offending files ( app.component.ts and app.module.ts ) in VSCode no error is shown. It looks like VSCode can find...
Read more >
How to install and use the Angular CLI? - Daniel Kreider
Open a terminal or command prompt and run this command to see the basic options and available commands for the Angular CLI. For...
Read more >
Workspace npm dependencies - Angular
The CLI command ng new creates a package.json file when it creates the new workspace. This package.json is used by all projects in...
Read more >
How To Install Angular CLI - KnowledgeHut
To operate on your application after installing Angular CLI, you'll have to run two commands: one to create a project and the other...
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