-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoped packages throw compilation errors #75
Comments
Nevermind I just fixed. It turns out that whenever you are creating scoped packages you want to update the package name in the
AND, you also need to update
Once you do that, you have scoped packages working correctly. PS: We can close this now, but don't you think it is worth creating a wiki page for people who want to create scoped packages with this generator? I really spend a few days trying to figure it out @jvandemo |
@jdjuan — Thank you for your follow-up, Juan. Much appreciated! 🏆 I have added a section to the README with instructions and a link to this issue. |
Thanks so much for this @jdjuan ! I'd tried the same fix before but I'd made the mistake of changing the "flatModuleOutFile" to include the scope too, which stopped it from building. Anyone else that made the same mistake, ONLY change "name" and "flatModuleId", you don't need to change "flatModuleOutFile". |
@DaveMonag — Thank you for your follow-up 👍 |
We still had this issue when trying to build using AOT (angular cli The fix in this case was in So for |
@odolha — Thank you, what error were you seeing when you used the |
Sure, it was like this:
And a bunch of other errors like this for each import of something from the module that we have. From what I can gather, when using the This occurred for |
@odolha — Did you have a I think adding Would you be able to verify that? Thanks in advance! |
@jvandemo I was also expecting this to work but to no avail... I'm not sure why angular stubbornly expects |
@odolha — Thank you, feel free to let us know if you find out why it happened. Thanks! |
When I try to compile an application for production that uses a library which has an NPM scope, it throws errors and fails.
Reproduction Steps
mkdir lib
,cd lib
, andyo angular2-library
ng new app-seed
package.json
(the one insrc
, or thedist
folder) to be scoped:"name": "@aaa/lib",
NPM link
of your library:npm link
and then inside your app:npm link @aaa/lib
ng build --prod --aot
and see the console error below. Commandsng serve
andng build
work well.You can also clone this repo and jump to step 3.
Error
Environment
The text was updated successfully, but these errors were encountered: