-
Notifications
You must be signed in to change notification settings - Fork 433
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
Only on live site: Prerendering failed unexpected token , #659
Comments
Glad to hear it! 👍 💯 Can you run a |
@MarkPieszak Some strange warnings, is the render string being cut short?
|
@Gaulomatic I tried that work around, unfortunately it doesn't seem to remove the error with pre-rendering. I'm not really much use with webpack, so it may be my code as I had to take an educated guess at it, initially I tried the code as is, but was met with an error about not having ts-loader, so I tried awesome-typescript-loader, but the prerender bug was still there. I then tried just tagging the additional test to the existing like so:
And a couple of other ways. Sadly no matter what, there is still an unexpected token ',' and in addition because I'm so skilled at breaking things, webpack errors now. |
I agree, WebPack can be a bitch at times. When it runs, it runs great. But the meme "Don't touch a running system" was invented by somebody working with WebPack :-) I just rewrote my complete WebPack config today and yesterday - it was a nightmare. I altered the paths to Do you have a repo for you project? |
At some point I'm going to have to learn webpack properly rather than the couple of hacks I've picked up along the way! I'm actually getting the error out of the box with this repo, and only when published to a server!? The warnings from webpack aren't really an issue as far as I can see, just an irritation. The problem comes when the repo is built for production and published to my host. locally everything is fine, and the only issue is the webpack warnings. If I navigate to the temp site I get "Preredndering failed due to an unexpected token ," which combined with the size warning is what made think maybe something was being cut short, but it could just as easily be a stray comma. |
maybe nodejs is not installed or the wrong version is on the server? |
put node.exe to virtual folder on your hosting |
I'm using shared hosting so a virtual directory isn't an option. I noticed that we can now do self contained publishing in VS2017, can we add node.js to that? My host says that the version installed on the servers is 8.9.4 but I need to upgrade to a semi-dedicated plan to make use of it. Which is odd since I have had all other versions of this repo working on their servers. |
Ohhh. I don't like this repo, cause it contains a lot of garbage... you are using smartepasp? |
I am using smarterasp! I generally strip this repo down as it's the SSR that I'm really after, and when I try to make my own from scratch it never seems to work! I've looked at a few repo's and this one seems to be the most stable, the only thing I miss is the full angular CLI integration, which is now on the todo list. |
So if are you using smarterasp there is virtual folder in some preferences)
but it was another version of this repo (it was dotnet 2.0 and angular 5). |
I didn't know that was even there :) do I just create a virtual folder (I'll call it nodejs) upload node.exe, then just publish? Do I need to configure a path anywhere? |
Well damn! that worked thanks @hartov |
Hi,
Loving the template, and the new additions!
I've been chasing my tail all day with this one! I thought I was doing something wrong, so downloaded a fresh copy of the master, built it, and published it to my host. I was met with the same error!
Got to love those errors! somewhere there's a stray comma, or at least its getting one when its not expected! This error was saved in the logs, I can't for the life of me figure out where this is from, I can build and run it within visual studio, both debug and release, but put in a production environment and IIS and this bug crops up, I don't use docker but I assume that shouldn't matter. I can build and deploy the old Angular 5 version with out any trouble, in case that helps. Maybe its my host, but since everything else seems to work with them I find it unlikely.
Id love to get this running properly, although it seems to be just me with this issue right now!
The text was updated successfully, but these errors were encountered: