Wildhoney / Magento-on-Angular

Angular.js application using Magento as the backend API
360 stars 120 forks source link

Error running node node/server.js #78

Closed CapnMigraine closed 10 years ago

CapnMigraine commented 10 years ago

Hi, I'm getting the following error after running node node/server.js:

undefined:1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
^
SyntaxError: Unexpected token <
    at Object.parse (native)
    at Request._callback (/var/www/moa/node/server.js:24:21)
    at Request.self.callback (/var/www/moa/node_modules/request/request.js:122:22)
    at Request.EventEmitter.emit (events.js:110:17)
    at Request.<anonymous> (/var/www/moa/node_modules/request/request.js:888:14)
    at Request.EventEmitter.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/var/www/moa/node_modules/request/request.js:839:12)
    at IncomingMessage.EventEmitter.emit (events.js:129:20)
    at _stream_readable.js:898:16
    at /var/www/moa/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31

Here's the contents of my config.json file, as suggested in the wiki:

{
    "socket": {
        "port": "8888",
        "host": "www.example.com"
    },
    "magento": {
        "path": "/var/www/magento",
        "host": "http://magento.example.com",
        "store": "0"
    },
    "api": {
        "host": "http://api.example.com",
        "provider": "magento"
    }
}

Also, the config of my vhost files

Magento

ServerName magento.example.com
ServerAlias magento.example.com
DocumentRoot /var/www/magento

MoA

ServerName www.example.com 
ServerAlias www.example.com 
DocumentRoot /var/www/moa/store

API

ServerName api.example.com
ServerAlias api.example.com
DocumentRoot /var/www/moa/api/public

Any idea of what could be wrong?

Cheers

aonic commented 10 years ago

what do you see in your apache error log?

serjuiced commented 9 years ago

care to share some insight on how you resolved it? I am having the exact errors on the same lines. thanks

aonic commented 9 years ago

That error is usually when the URL to the laravel API is wrong

Raja Kapur

On Tue, Feb 17, 2015 at 8:42 AM, serjuiced notifications@github.com wrote:

care to share some insight on how you resolved it? I am having the exact errors on the same lines. thanks

— Reply to this email directly or view it on GitHub https://github.com/Wildhoney/Magento-on-Angular/issues/78#issuecomment-74669075 .