-
Notifications
You must be signed in to change notification settings - Fork 12k
ng serve doesn't work with linked module #7332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This have been discussed many times as in #6228 (comment). I believe the correct way to do this is to use |
I am having a similar issue since the cli >1.3 version. I did check the story on linked modules and - to my understanding - I am doing what is being asked there. Picture: I am developing an App for the web and iOS/Android that uses a common set of core modules (mainly NGRX functionality and interfaces). Those core files are compiled into a module that gets linked to the web/ mobile app. I compile the lib with I am a little confused as to what is going here. I have also looked at the example repo that @filipesilva created. It seems overkill in my case (until now it worked well without all that). The core module is here. Any ideas? I would love to move along with cli and not be pinned to 1.2.4 ;) |
just to mention the error message:
This appears in the browser itself (console), while the CLI output is fine. If I don't use commonjs as module for the core module, then al hell breaks lose :) |
Thanks @hieuxlu for your reply. |
More information that may be helpful: |
Closing as a duplicate of #6228 (comment) and #7341, as @hieuxlu mentioned. Please see those issues for the recommended approaches. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.2.6
node: 6.11.1
os: win32 x64
@angular/animations: 4.3.3
@angular/common: 4.3.3
@angular/compiler: 4.3.3
@angular/core: 4.3.3
@angular/forms: 4.3.3
@angular/http: 4.3.3
@angular/platform-browser: 4.3.3
@angular/platform-browser-dynamic: 4.3.3
@angular/router: 4.3.3
@angular/cli: 1.2.6
@angular/compiler-cli: 4.3.3
@angular/language-service: 4.3.3
Repro steps.
Create a node module locally and link it with
npm link
.Go to your project generated with @angular/cli and link this module:
npm link ngx-my-module
.Use your module in your project. For instance:
Then run
ng serve
The log given by the failure.
Mention any other details that might be useful.
I used generator-ngx-library to generate my node module project. It uses @angular/cli in a demo app.
The text was updated successfully, but these errors were encountered: