-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:libraryneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given
Description
Versions
Angular CLI: 1.7.4
Node: 7.7.3
OS: darwin x64
Angular: 5.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.7.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack: 3.11.0
Repro steps
- create a library
- pack it using npm pack
- install the tgz file using npm install --save path_to_tgz_file
- run client project
Observed behavior
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve '@my_library/sdk' in '/Users/eestein/Documents/dev/my_library/sdk-front/samples/src/app'
ERROR in ./src/app/app.component.ts
Module not found: Error: Can't resolve '@my_library/sdk' in '/Users/eestein/Documents/dev/my_library/sdk-front/samples/src/app'
Desired behavior
Angular CLI would recognize the local package.
Mention any other details that might be useful (optional)
This is what I have in my package.json of the client project:
"@my_library/sdk": "file:///Users/eestein/Documents/dev/my_library/sdk-front/library/my_library-sdk-1.0.0-alpha.2.tgz",
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 it, but Angular CLI can't.
This is my folder structure:
- library
- library's code
- *.tgz file
- samples
- samples' code
- package.json referencing the tgz file
maxime1992, jainankit102, stephanebouget, alexbjorlig, Karthickvasu and 4 more
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:libraryneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given