I want to test out the project, so I followed the instructions in the Readme file, but I encountered errors.
I ran the following commands:
$ git clone https://github.com/ForceDotComLabs/mobile-ui-elements.git
$ cd .\mobile-ui-elements
$ npm install
$ bower install
$ grunt
# Update the `simple.html` file with an accessToken and instanceUrl.
$ python -m SimpleHTTPServer
Then I opened my browser to http://localhost:8000/simple.html
to use the app, but I see no content. The JS console has some errors:
GET http://localhost:8000/elements/css/responsive.shim.css 404 (File not found)
GET http://localhost:8000/elements/css/styles.shim.css 404 (File not found)
Refused to set unsafe header "User-Agent" jquery.js:8579
-> In Force.RemoteObjectCollection:sync method=read smartsync.js:1421
--> In Force.fetchRemoteObjects:cacheMode=server-first smartsync.js:1201
---> In Force.fetchSObjectsFromServer:config={"sobjectType":"Account","type":"mru","query":""} smartsync.js:1067
-----> Calling forcetkClient:metadata
OPTIONS https://na8.salesforce.com/services/data/v29.0/sobjects/account/describe/layouts/012000000000000AAA?_=1404262883624 401 (Unauthorized)
XMLHttpRequest cannot load https://na8.salesforce.com/services/data/v29.0/sobjects/account/describe/layouts/012000000000000AAA?_=1404262883624. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access.
------> Calling errorCB for forcetkClient:describeLayout
Alright, maybe I missed a build step. I tried running $ grunt dist
, but that also gave me an error:
Warning: ENOENT, no such file or directory 'C:\....\mobile-ui-elements\elements\css\responsive.shim.css'
Any ideas? I'm running this on my Windows machine, but that shouldn't matter as the data-related errors seem CORS-related. I know SFDC APIs don't support CORS requests, so how did you get this running locally?