alxndrsn / enketo-collect

ODK Collect clone using Enketo as the forms engine
3 stars 3 forks source link

Reference Error is thrown while launching index.html #43

Closed kpulluru closed 8 years ago

kpulluru commented 8 years ago

Hi Alex,

I have tried a workaround for the issue (https://groups.google.com/forum/#!topic/enketo-dev/Q3u2K-QRMzg) which I guess is worked. I have downloaded the enketo-core module tar file from npm's repository and extracted in the node_modules folder. I later removed the 'enketo-core' entry from package.json and installed the remaining dependencies. This went through fine.

After installing all the dependencies, I have used browserify command to generate bundle.js which I copied into static folder. When I launched the index.html, I have received beloew errors.

1) style.css is not found. How do we generate this file? 2) "Reference Error: _ is not defined" -> Screenshot is attached for this error.

Could you please help us to resolve these issues? Also please mention if we have to follow any steps to make it work smoothly with the test data.

referenceerror

Regards, Karthik

kpulluru commented 8 years ago

Hi Alex,

I have added the highlighted line (in the screenshot) and ran the browserify command to generate the new bundle.js file. This resolved the error however not sure if this is the right way to do it.

Could you please confirm?

image

Regards, Karthik

alxndrsn commented 8 years ago

To generate style.css you need to run grunt sass.

alxndrsn commented 8 years ago

Ref your extra line to require underscore - this should not be necessary, as enketo-collect uses lodash. It looks like you've cut this line out from the top of your screenshot: https://github.com/alxndrsn/enketo-collect/blob/9f1443b6b4cdd3e4647025799e1825c024d90ed0/www/js/main.js#L4