x)Happen'd first time. Existing libraries updated to 9.1.0 builds without a problem.
But Newly created after i update CLI to 9.1.0 shows me above error on building. Building regular application works thou.
Unable to build library project for freshly generated library project using cli 9.1.0
ng new my-lib-project --create-application=false
cd my-lib-project
ng generate library my-lib
ng build my-lib <=== ERROR
Repo: https://github.com/niteshpurohit/angular-cli-error-example-repo
ng build my-lib
An unhandled exception occurred: Package exports for '**/my-lib-project/node_modules/ng-packagr/node_modules/rollup' do not define a valid '.' target
See "/private/var/folders/ln/_gz8v98j4dx0sv4zvm38_sw80000gn/T/ng-4DqbHq/angular-errors.log" for further details.
[error] Error: Package exports for **/my-lib-project/node_modules/ng-packagr/node_modules/rollup' do not define a valid '.' target
at resolveExportsTarget (internal/modules/cjs/loader.js:545:13)
at applyExports (internal/modules/cjs/loader.js:459:14)
at resolveExports (internal/modules/cjs/loader.js:508:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:577:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:879:27)
at Function.Module._load (internal/modules/cjs/loader.js:785:27)
at Module.require (internal/modules/cjs/loader.js:956:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/**/my-lib-project/node_modules/ng-packagr/lib/flatten/rollup.js:12:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ โณ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 9.1.0
Node: 13.1.0
OS: darwin x64
Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.901.0
@angular-devkit/build-angular 0.901.0
@angular-devkit/build-ng-packagr 0.901.0
@angular-devkit/build-optimizer 0.901.0
@angular-devkit/build-webpack 0.901.0
@angular-devkit/core 9.1.0
@angular-devkit/schematics 9.1.0
@ngtools/webpack 9.1.0
@schematics/angular 9.1.0
@schematics/update 0.901.0
ng-packagr 9.1.0
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0
Node.js 13.0 and 13.1 do not support the latest specification for the exports field. Please consider updating to 13.2+ (13.12 is the latest).
Seems its working with 13.2.0. Thanks for your help.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Node.js 13.0 and 13.1 do not support the latest specification for the
exportsfield. Please consider updating to 13.2+ (13.12 is the latest).