-
Notifications
You must be signed in to change notification settings - Fork 120
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
Getting Started - unable to proceed due to errors #74
Comments
Im also having the exact same problem, I have been trying to get Moa to work successfully with not much luck. I did on one machine happen to get the api section working correctly when I did a: npm install –g [email protected]:[email protected] From: Marc [mailto:[email protected]] I'm running node 0.10.26 + npm 1.4.7 (installed using mxcl/homebrew) on OSX 10.9.2. Tried to get moa up and running using the getting started instructions, but kept encountering the following error during npm install:
Warning: Task "uglify" not found. Use --force to continue. Aborted due to warnings. npm ERR! [email protected]:[email protected] postinstall: npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the [email protected]:[email protected] postinstall script. npm ERR! This is most likely a problem with the node-snapshot package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node_modules/bower/bin/bower install && node_modules/grunt-cli/bin/grunt build:production npm ERR! You can get their info via: npm ERR! npm owner ls node-snapshot npm ERR! There is likely additional logging output above. npm ERR! System Darwin 13.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Users/mystix/git/Magento-on-Angular npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.7 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Users/mystix/git/Magento-on-Angular/npm-debug.log npm ERR! not ok code 0 Managed to workaround this by changing the dependencies list in package.json to:
} } then tried to Initialise the Node.js instance: node node/server.js;, but encountered the following error: ➜ Magento-on-Angular git:(master) ✗ node node/server.js SyntaxError: Unexpected token u
Any ideas what I'm doing wrong? — |
I'll take a look at the other errors, but in the meantime your last error is caused by a misconfiguration in the API. Please take a look at the API path for any Magento errors: |
I've just done a Which version of node are you folks using?
|
I'm running an OSX 10.9.2 box. |
I am running v0.10.26 Im also trying to run this off a windows box….. smack |
No problem! It should still work fine. Please update your branches and try another |
@Wildhoney Updated.
|
@Wildhoney I'm also unsure of how to configure
what URL should I use for the |
Sorry, there was a problem with my Snapshot module. I've pushed an update, and also updated the For the API path |
Thanks for the quick fixes @Wildhoney. I'm running into a different error now with
Tried it with the following
and
but no dice with either config. p.s. Could you explain how one would go about defining
|
It needs to be the URL that resolves to the API. If you can get your API endpoints working, then the above config is all fine and dandy. If you navigate to |
Navigating to
If it helps, I'm running Magento 1.7.0.0. [edit] Will attempt to reconfigure nginx and |
OK so i keep on hitting the same blocker. remembering i am running php on windows via iis8.5 im hitting this problem when I run
from the api's directory. this is my config.json file by the way.
C:\inetpub\wwwroot\Magento-on-Angular\api>composer install [RuntimeException] install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-p C:\inetpub\wwwroot\Magento-on-Angular\api> How do the relative paths to the magento source work on windows? Thanks in advance. |
Thanks @Wildhoney. Managed to get things (mostly) up and running once I set things up using I'm now running into a separate error when loading the My virtual hosts are setup as follows:
and my
|
It appears there was an oversight in my preferred vhost setup. The . A temporary solution is for you to:
@Wildhoney what do you think is a good permanent solution? Should |
For testing I did copied the bower_components into /store/ and index.html is loading all scripts now. Only the api request are not working. |
@aonic Yep -- I've done that (
Note: the path to jquery is also incorrect (already corrected in the code snippet above). |
Keep running in this error.... Acer@ACER-PC /c/xampp/htdocs/Magento-on-Angular (master) SyntaxError: Unexpected token < |
@robbietapping unfortunately I do not have an IIS environment to test. What PHP version are you using? take a look at https://github.com/Wildhoney/Magento-on-Angular/blob/master/api/app/classes/Moa/API/Provider/MagentoProvider.php#L32 to see how the Magento path is used. @Dijkie what is the |
Vhost: <VirtualHost *:80> |
VirtualHost *:80 |
Here is an example of what you should see when you go to |
Getting 500 error |
What does your apache error log say? |
[Thu Apr 24 17:16:06.381510 2014] [core:alert] [pid 8664:tid 1668] [client 127.0.0.1:60572] C:/xampp/htdocs/Magento-on-Angular/api/public/.htaccess: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration |
And bu executing node/node server.js this one. $ node node/server.js SyntaxError: Unexpected token < |
Why the errors show up in the network inspector? |
@Dijkie Because CORS has not been enabled on the domain api.example.com (see http://en.wikipedia.org/wiki/Cross-origin_resource_sharing). Because XHR requests from the domain www.example.com are being made to the domain api.example.com. |
I'm currently overloaded with tasks, but will hopefully get an opportunity in the next half an hour to add this 👍 |
Ok...Do I need to set this header in the vhost? |
Yep, try adding |
Hi again! First of all thanks for all the help! Like you set I did changed my vhost like this MOA virtual hostsmagento.example.comVirtualHost :80 api.example.comVirtualHost :80 example.comVirtualHost :80 Like I said the api is working but when I try to register as a user nothing happens.... I did a lot of reading about socket.io and express and there's a lot written of setting this in the server file? Does this need to be set here as well? Regards Martijn |
Forget the say: I don't see the Header add Access-Control-Allow-Origin "" coming back in the response headers when I inspect www.example.com |
Have you tried running MOA off IIS? I've successfully got Magento/MOA running off IIS 8 flawlessly! If you need contributors for MOA let me know I would be keen to give some resources. @Dijkie - I owe you one, your document root example for your config.json was what ended my 3 hour pain of working out why MOA would not compile. Sent from my iPhone On 27 Apr 2014, at 23:07, "Dijkie" <[email protected]mailto:[email protected]> wrote: Hi again! First of all thanks for all the help! Like you set I did changed my vhost like this MOA virtual hosts VirtualHost :80 api.example.comhttp://api.example.com VirtualHost :80 example.comhttp://example.com VirtualHost :80 Like I said the api is working but when I try to register as a user nothing happens.... I did a lot of reading about socket.io and express and there's a lot written of setting this in the server file? Does this need to be set here as well? Regards Martijn Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-41496081. |
@ robbietapping it's mister Wildhoney his project :) and I try to learn from him. But thanks for the thanks anyway 👍 :) I never tried IIS, I'm happy for now starting to understand apache |
Hi, I'm getting the following error after running node node/server.js:
Here's the contents of my config.json file, as suggested in the wiki:
Also, the config of my vhost files Magento
MoA
API
Has anyone experienced the same issue? Cheers |
try going to api.example.com/products -- what do you see? |
Also, what do you see in your apache error log? |
The laravel storage folder needs proper write permissions for the web server user. Sent from my phone
|
Thanks, I fixed that. I keep getting the same error from node.js, though. Also, still can't find api.example.com/products |
What do you see when you go to the /products page? |
I was able to make the /products page work, by tweaking the vhost files. I can see the product JSON string now. However, running node node/service.js I still throws the following error:
Any ideas? |
Does your node server know how to resolve api.example.com to the correct IP? |
Yes, it's working now. I can see the products in the store page. I'm having a slightly different issue now. You can see them in the image below I installed MoA on a VM, so I'm redirecting port 8080 on the host to port 80 on the guest. If I access to GET http://api.dev:8080/basket, for example, it works. |
You can edit the config.json to add :8080 to the URLs -- let me know if Raja Kapur On Thu, Jul 24, 2014 at 12:39 PM, red5code [email protected] wrote:
|
When I add the port to the api host value like this: "api": { I start getting the "Unexpected token u" error from node again. |
I added a new vhost to answer requests through port 8080 and now it's working. |
👍 |
I am getting this error SyntaxError: Unexpected token D Please suggest solutions. |
Hi, I am also getting the "SyntaxError: Unexpected token <" error when trying to run node/server.js, full error here: SyntaxError: Unexpected token < However when I hit api.example.com i get this php error, which is also in the apache logs: Warning: require(/var/www/html/moa/api/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/moa/api/bootstrap/autoload.php on line 17 Fatal error: require(): Failed opening required '/var/www/html/moa/api/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/moa/api/bootstrap/autoload.php on line 17 from apache: [Wed Sep 10 16:28:07.915658 2014] [:error] [pid 30558] [client 127.0.0.1:33668] PHP Warning: require(/var/www/html/moa/api/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/moa/api/bootstrap/autoload.php on line 17 what is this /vender/autoload.php about? Any help would be appreciated. |
|
Thank you @Wildhoney Its working now ! Currently code wrote upto cart. No logic for checkout right ? |
Sadly that's right – any pull requests relating to checkout gleefully merged! |
I'm running node 0.10.26 + npm 1.4.7 (installed using mxcl/homebrew) on OSX 10.9.2.
Tried to get
moa
up and running using the instructions from the Getting Started section of the README, but kept encountering the following error duringnpm install
:Managed to workaround this by changing the
dependencies
list inpackage.json
to:then tried to Initialise the Node.js instance: node node/server.js; but encountered the following error:
Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered: