-
Notifications
You must be signed in to change notification settings - Fork 11
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
Can't use netlify.request #113
Comments
I see you're using Angular v18. We recently shipped a fix to this plugin that adds support for v18: #110 Also, could you post the console output of |
Here it is. Check the
|
Alright, to me this looks like the Angular plugin isn't running as intended. See the |
I have the exact same issue. Here's a minimal reproduction repo: https://github.com/srcn/netlify-angular-ssr |
Thanks for providing the repro! I think what's going on here is that your CLI isn't connected to the Netlify site, so it doesn't automatically install the Angular plugin that's required to make SSR work correctly here. To connect, you can run [[plugins]]
package="@netlify/angular-runtime" |
Actually it was linked and the runtime was installing correctly but I figured out the issue. The prerendering was enabled! Disabling the prerendering from angular.json fixes the issue. |
Happy to hear you got it fixed @srcn. I think @quedicesebas your case is a little different, the logs clearly show that the plugin isn't running. Could you try the |
Sorry @Skn0tt, I moved to the brand new App Hosting service on Firebase. |
Describe the bug
I need to use the request info in my app, you say I can inject in my components constructor the
netlify.request
, and, for example, print on the console the request url, but where can I see that output running locally withnetlify serve
? Please helpTo Reproduce
Steps to reproduce the behavior:
@Inject('netlify.request') @Optional() request?: Request,
to the main component (AppComponent), the home page component and a service constructors:path: undefined
headers: undefined
everywhere.Expected behavior
Be able to obtain the request url and headers to extract info and use to SSR load data.
Versions
If you're using the CLI to build
If you're using file-based installation
The text was updated successfully, but these errors were encountered: