jvandemo / jvandemo/generator-angular2-library

Build error

Open
#253 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
740
Forks
116
PR merge metrics
No merged PRs in 30d

Description

I have two libraries "drafting-common" & "drafting-services" built using angular-4 and bundled with Rollup in two formats = es,umd
I am using them in angular-cli project by packing the libraries using "npm pack" and install the tgz files under project directory, so i can reference the modules and services from both libraries inside the angular-cli project.

when i run ng build the result is webpack: compiled successfully.
then ng serve it also compile & run successfully, but the issue comes when I browse http://localhost:4200 to load the project page, I am getting this error

Uncaught Error: Unexpected value 'ButtonComponent' declared by the module 'SharedModule'. Please add a @Pipe/@Directive/@Component annotation.
where SharedModule is exposed by drafting-common library, and ButtonComponent is an exposed component in it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported flow by packing drafting-common and drafting-services, installing their tgz files in the Angular CLI project, and running ng build followed by ng serve. Investigate why ButtonComponent in SharedModule is rejected at page load; done when the project loads without the annotation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.