Skip to content
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

Angular SharedModule problem #646

Closed
3 tasks done
prepfarm opened this issue Nov 21, 2023 · 5 comments
Closed
3 tasks done

Angular SharedModule problem #646

prepfarm opened this issue Nov 21, 2023 · 5 comments
Labels
angular Concerns the Angular integration piral-ng. documentation Concerns the available documentation.
Milestone

Comments

@prepfarm
Copy link

Bug Report

For more information, see the CONTRIBUTING guide.

Prerequisites

  • Can you reproduce the problem in a MWE?
  • Are you running the latest version?
  • Did you perform a search in the issues?

Environment Details and Version

Piral 1.3.3

Description

import { SharedModule } from 'piral-ng/common'; fails as it says that it cannot find module, even tho it's shared module from app shell. Installing it separately in the pilet, results in errors that @types/react isn't installed. Even after instaling types, errors are shown.

Steps to Reproduce

  1. Initialize Angular pilet
  2. Add SharedModule inside of @NgModule

Expected behavior

To be able to use <extension-component>

Actual behavior

Throws errors on build/debug once it's imported.

@prepfarm prepfarm added the bug Something isn't working label Nov 21, 2023
@FlorianRappl
Copy link
Contributor

Can you please show a MWE and have your steps to reproduce filled out properly?

For instance, "initialize Angular pilet" - what does that mean? Are you using the template? Also, keep in mind that the package is piral-ng-common, not piral-ng/common, which is the old / outdated shim.

@FlorianRappl FlorianRappl added angular Concerns the Angular integration piral-ng. repro-needed How to make it not work on my machine? labels Nov 21, 2023
@prepfarm
Copy link
Author

Thanks for quick reply! I was able to get it working by using piral-ng-common and not piral-ng/common which I saw in many examples and also in the docs (see under For pilet authors)

@FlorianRappl
Copy link
Contributor

Thanks for the info - yes the peer dependencies (look at top of the document) are mentioned, however, as you stated it should be more clear that

npm i piral-ng-common

is mostly needed (otherwise some version is installed which might fit your Angular version or not - in the latter case leading to problems).

@FlorianRappl FlorianRappl added documentation Concerns the available documentation. and removed bug Something isn't working repro-needed How to make it not work on my machine? labels Nov 21, 2023
@FlorianRappl FlorianRappl added this to the 1.4.0 milestone Nov 21, 2023
@FlorianRappl
Copy link
Contributor

Re-opened as documentation task.

@FlorianRappl FlorianRappl reopened this Nov 21, 2023
@FlorianRappl
Copy link
Contributor

Landed in develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular Concerns the Angular integration piral-ng. documentation Concerns the available documentation.
Projects
None yet
Development

No branches or pull requests

2 participants