angular2-sails 404 error (not found) - sql-server

I am having difficulty hooking up my sql server with a front end of angular 2.
I ran the sailsjs getting started guide
I then hooked up angular2 with sails. I followed the sharpten guide
http://sharpten.com/blog/2016/02/02/integrating-angular-2-with-sails-js.html
I then used the sails-sqlserver package to connect to my localhost sql server
sails-sqlserver
I have the sails returning my data and now i want to use angular 2 to interact with the data.
I found the angular2-sails package.
https://www.npmjs.com/package/angular2-sails
However, I am getting a 404 error with the angular2-sails package
ERROR:
zone.js:1382
"GET http: //localhost:1337/node_modules/angular2-sails/ 404 (Not Found)"
How do i get rid of this 404 error?
Thanks.

I got this to work with version 0.1.4 of angular2-sails.
i commented out the sailsmodule due to version 0.1.4 just having the SailsService
//import {SailsModule} from "angular2-sails";
In my component I imported the SailsService
import {SailsService} from "angular2-sails/dist/index";

Related

requests are working locally but not on Heroku. Getting internal server error 500 and JSON not valid

I built a web application with django and react. It is working perfectly fine locally and the heroku deployment worked fine without issues.
When I am testing the heroku app some of my requests are working fine like login/register. However the request where information is being sent back from the server to be displayed or post requests sending information are giving me the following error
GET [request name] 500 (Internal Server Error)
and
Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Would this issue be related to my requirements.txt or Procfile? Since the issue is not happening when the project is run locally and only on heroku.
Could anyone point me in the right direction?

Sitecore JSS (Headless) + React. Can not deploy app. Status: 403

I am trying to deploy my first react app.
I have followed all the steps according to the instructions.
But when it comes to app deployment I keep getting the same message.
Unexpected response from import status service. The import task is probably still running; check the Sitecore logs for details.
Status message:
Status: [403]
Can anyone help me with this?
Hosts added
Confings and the error
Api is working
please go through my comment on : 403 error when importing a new JSS app to Sitecore 10.2
also make sure your API key and layout service is configured properly e.g. http://myapp.siteco.re/sitecore/api/layout/render/jss?item=/&sc_apikey={YOUR_API_KEY_ID}
Similar kind of issue: 403 error when importing a new JSS app to Sitecore 10.2

How to fix a 404 error pulling data from MongoDB

I am working on a backend for my React app that pulls the data from MongoDB, but receiving a 404 error whenever I try to launch the app.
Here is how I added axios in App.js file:
Here is the route in server.js file:
But I am getting this error whenever I try to open the main page of the app:
When I launch the database using node server.js command, the database is started successfully.
I don't have much experience for troubleshooting such errors - can anyone please offer some advice?

react native 404 not found while using deployed endpoint

I'm using React Native to work on my project. The problem I'm facing: it is working perfectly 200 ok while fetching data locally but, when I try to use after deployment it says 404 not found.
What could be the reason?
A 404 error is an HTTP status code that means that the page you were trying to reach, couldn't be found on their server.

Weird issue fetching HTTP URL on Production AppEngine instance [Java]

I am quite puzzled by this behavior.
I have a Java AppEngine instance which makes an http call to a "settings.php" on another server. But I get the following error:
ERROR :
java.io.IOException: Could not fetch URL: http://<3rdpartywebsite>/settings.php
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:138)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:45)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:30)
...
I have tried using URLFetchService and even a simple HttpURLConnection class. Even tried with a different User-Agent and other http headers, but to no avail.
What is baffling is that the same code and website works fine on Local Eclipse Dev environment, works via Browser (can see php text) AND works on the Compute Engine too! Only the Production App Engine throws the "could not fetch" error. Unfortunately this is not a transient error, it fails 10/10 times.
Any idea what could be going wrong or something that I can try?
Thanks, Asim

Resources