gonzofish / angular-librarian

An Angular 2+ scaffolding setup for creating libraries
https://www.npmjs.com/package/angular-librarian
MIT License
91 stars 9 forks source link

Build fails with scoped package name / changed package name #58

Closed tommueller closed 6 years ago

tommueller commented 6 years ago

My build is failing since the update to the official beta versions, because apparently the new build-process reads the package-name from the package.json for something? When I created the package I called it MyLib and some weeks later had to rename it to @MyCompany/MyLib. Since the upgrade this breaks the build process.

{ Error: Could not resolve entry (/workspace_angular/library/out-tsc/lib-es2015/@MyCompany/MyLib.js)
    at error (/workspace_angular/library/node_modules/rollup/dist/rollup.js:170:12)
    at /workspace_angular/library/node_modules/rollup/dist/rollup.js:9622:5 code: 'UNRESOLVED_ENTRY' }

also running ngl init again and trying to rename the module here does not work.

I get the same error if I change the package name to anything else!

PS: thanks for all the great work and latest updates. Have been on holidays for the last weeks and am super excited that this is so actively maintained!

gonzofish commented 6 years ago

Can I see your package.json as a Gist or something?

gonzofish commented 6 years ago

Also looks this & #59 may be similar issues

tommueller commented 6 years ago

59 does look related, yes. This is my package.json:

https://pastebin.com/GcKVC817

Thanks

gonzofish commented 6 years ago

Thanks! This will help! Scoped packages weren't originally supported, so it's "natural" that they failed. There are some considerations that need to be made to support them...

In your package.json, did you manually change the entrypoint values (main, es2015, module) and typings values? Just wondering, it doesn't seem like librarian would've produced those values.

tommueller commented 6 years ago

In your package.json, did you manually change the entrypoint values (main, es2015, module) and typings values? Just wondering, it doesn't seem like librarian would've produced those values.

I renamed them for pasting them to remove the company name. They are originally in the form "./package-name.es5.js etc. pp.

gonzofish commented 6 years ago

Ah, gotchya

gonzofish commented 6 years ago

By the way, I'm going to close this one and use #59 as the main issue (only because I looked at it first).

gonzofish commented 6 years ago

PS: thanks for all the great work and latest updates. Have been on holidays for the last weeks and am super excited that this is so actively maintained!

I just realized I didn't say thank you for your kind words...so thank you!