Skip to content

@netlify/angular-runtime is not exposing the api it says in the documentation #269

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

Closed
ezhupa99 opened this issue Mar 3, 2025 · 2 comments · Fixed by #279
Closed

@netlify/angular-runtime is not exposing the api it says in the documentation #269

ezhupa99 opened this issue Mar 3, 2025 · 2 comments · Fixed by #279
Labels

Comments

@ezhupa99
Copy link

ezhupa99 commented Mar 3, 2025

Describe the bug
I installed version 2.2.2 because it was throwing build errors when I tried to deploy my pre-rendered angular app.

Image

To Reproduce
Steps to reproduce the behavior:

  1. Create simple ssr angular app
  2. Install the netlify runtime package
  3. Try to "make it work" from the documentation which is not descriptive

Expected behavior
Be able to deploy by following instructions

Versions

  • Angular: 19.1.7
  • plugin (if installed in your package.json at fixed version): @netlify/angular-runtime: 2.2.2

If you're using the CLI to build

  • OS: [e.g. macOS, Windows]
  • netlify/cli version:

If you're using file-based installation

  • netlify.toml:
@ezhupa99
Copy link
Author

ezhupa99 commented Mar 3, 2025

I also found out that if I update

"moduleResolution": "nodenext",

in tsconfig.json then the package resolves okay, but this needs to be stated in the docs, and also why do I need to make all these changes for this to work?

@pieh
Copy link
Contributor

pieh commented Mar 21, 2025

Hi @ezhupa99

This was not intentional for those to be not resolvable. All of our fixtures had "moduleResolution": "bundler" which was hiding this problem. I did add test fixture using "moduleResolution": "node" (as that seems to be the oldest method of resolving modules) and made adjustments to setup to work with older module resolution settings in #279

I did streamline some things a bit and added fallbacks for older module resolutions and released new version ( https://github.com/netlify/angular-runtime/releases/tag/v2.3.1 ).

If you already have things working after changing module resolution in your project you won't need to change anything, but otherwise I would recommend using @netlify/angular-runtime/common-engine.mjs imports (with extensions) as extensionless ones become problematic to support for various configurations. We do keep export map so the previous extensionless import should continue to work.

With that, I'll close this ticket - feel free to re-open if you still have troubles with resolving those modules

@pieh pieh closed this as completed Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants