Skip to content

CLI Webpack does not work with linked local packages #2154

@jbeckton

Description

@jbeckton

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Linux CentOs 7
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.14
    node: 6.2.2
    os: linux x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

This app was created using the CLI Beta 10 then updated following this guide

  1. The log given by the failure. Normally this include a stack trace and some
    more information.
metadata_resolver.js:230 Uncaught Error: Unexpected value 'SecurityModule' imported by the module 'AppModule'(anonymous function) @ metadata_resolver.js:230CompileMetadataResolver.getNgModuleMetadata @ metadata_resolver.js:215RuntimeCompiler._compileComponents @ runtime_compiler.js:126RuntimeCompiler._compileModuleAndComponents @ runtime_compiler.js:64RuntimeCompiler.compileModuleAsync @ runtime_compiler.js:55PlatformRef_._bootstrapModuleWithZone @ application_ref.js:303PlatformRef_.bootstrapModule @ application_ref.js:285(anonymous function) @ main.ts:12__webpack_require__ @ bootstrap b58e42a…:52(anonymous function) @ main.bundle.js:123845__webpack_require__ @ bootstrap b58e42a…:52webpackJsonpCallback @ bootstrap b58e42a…:23(anonymous function) @ main.bundle.js:1
2client?93b6:38 [WDS] App updated. Recompiling...
  1. Mention any other details that might be useful.

I have a local Angular 2 library Package that I link (npm link mypackage) during development of this library. I have been working on this package in this manner for 6 months with no issues. Now that I am trying to upgrade to the CLI webpack version it no longer works

I have the package referenced in the dependencies section of my web app package.json file. I can see the sym link in my projects node_modules directory but it's like it does not exist when the app runs.

Another issue is that I have some css files inside this package but when I reference them in the angular-cli they are not loaded when the app loads.

"styles": [
        "../node_modules/digitalglobe-ui/css/dg-bootstrap-dark.min.css",
        "styles.css"
      ]

Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions