-
Notifications
You must be signed in to change notification settings - Fork 77
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
Using module with SSR from angular cli gives import error #31
Comments
Hi @jimmy-tfp, thank you for submitting your issue. I will be investigating this soon! |
@nicky-lenaers I just ran into this issue as well - the error only came up while building for SSR, same error as what @jimmy-tfp reported. Thanks for your work on the module but I would say until this issue is resolved you might want to remove the mention on the repo homepage that this module works with SSR. |
@jacobedawson @jimmy-tfp I'm working on this issue. Will be resolved soon! |
@nicky-lenaers thanks for your effort dude, in all other aspects it's a great module :) |
@jacobedawson @jimmy-tfp I did a full repo overhaul to enforce a package called I'd like to get your feedback on whether it works or not. Thanks, your feedback is much appreciated! |
Hi @nicky-lenaers - I just installed 0.4.0-alpha.3 and I got this error during compilation (no other changes made - just installed ngx-scroll-to, added imports in module.ts, set up the service from this repo):
|
@jacobedawson Thank you for reporting this. I came across quiet a hot issue topic that references this issue. It seems there could be multiple factors that cause this error. Even outside of the scope of this module. The fact that I have a working example in a repo confirms that. I'd really like to help you with this. Do you mind setting up a small example repo or plunkr with your setup (or share the repo you already have if possible), so I'm able to properly figure out what causes this error? Thanks in advance. |
@nicky-lenaers yo dude - sure thing, will have a look tomo morning (bedtime in berlin...zzz) and get back to you, cheers! |
Sure man, same thing in your neighbor Netherlands :-) let me know when you got something! |
@jacobedawson I've been doing research into this issue. It seems to not be related to this module specifically. My suggestion is to check your installed versions of Angular itself and go through topics that address your issue. Thanks again for your feedback, this is much appreciated! Closing this issue due to irrelevance to the module. |
I'm submitting a...
Current behavior
Our SSR app is built using this guide: https://github.com/angular/angular-cli/wiki/stories-universal-rendering and works well. However if you npm install --save this module you get:
import xyz
^^^^^^
SyntaxError: Unexpected token import
when you run in on the server with "node server.js"
It works very well if we just build it in our app, Thanks!
Expected behavior
It runs on the server.
Minimal reproduction of the problem with instructions
Build a SSR app using the above guide. I could start over an make one if you want?
What is the motivation / use case for changing the behavior?
Works on the server.
Environment
The text was updated successfully, but these errors were encountered: