Skip to content

Ionic 4 library build - BUILD ERROR error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option. #16298

Closed
@ebeling

Description

@ebeling

I like to build a library for sharing it with team. Since Angular 6 this is possible. So I created a new blank ionic project with:
ionic start myApp blank --cordova
Then I created a library with:
ng generate library xxxlib
if I try to package the library with:
ionic build --project xxxlib
an error occures:

...
Building Angular Package
Building entry point 'xxxlib'
Compiling TypeScript sources through ngc

BUILD ERROR
error TS5060: Option 'paths' cannot be used without specifying '--baseUrl' option.

I found following bug and fix for angular-cli:
angular/angular-cli#11258

This is not the same problem, because here was speaking about a migration but can it be, that the ionic starter script is also not writing the necessary baseUrl to tsconfig.json ?

ionic info

Ionic:

ionic (Ionic CLI) : 4.3.1 (/usr/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.15
@angular-devkit/build-angular : 0.8.6
@angular-devkit/schematics : 0.8.6
@angular/cli : 6.2.6
@ionic/angular-toolkit : 1.1.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)

System:

NodeJS : v8.12.0 (/usr/bin/node)
npm : 6.4.1
OS : Linux 3.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions