webis-de / mturk-manager

An alternative front end for Amazon Mechanical Turk
GNU General Public License v3.0
12 stars 4 forks source link

Build documentation #70

Open zeuner opened 3 years ago

zeuner commented 3 years ago

I'm unable to build mturk-manager from source. From the comments, I assume that deploy.sh is supposed to achieve this. It works for the backend part. For the frontend part, it fails right on the first command npm run build:

 ERROR  Failed to compile with 213 errors11:34:07 AM

 error  in /home/mturk/mturk-manager/frontend/src/main.ts

ERROR in /home/mturk/mturk-manager/frontend/src/main.ts(13,17):
13:17 Cannot find module '@/App'.
    11 | import VueCompositionApi from '@vue/composition-api';
    12 | import { store } from './store/vuex';
  > 13 | import App from '@/App';
       |                 ^
    14 | 
    15 | import { router } from './router';
    16 | import { vuetify } from './vuetify';

 error  in /home/mturk/mturk-manager/frontend/src/mixins/settings-batch.mixin.ts

ERROR in /home/mturk/mturk-manager/frontend/src/mixins/settings-batch.mixin.ts(10,14):
10:14 Parameter 'object_settings_batch' implicitly has an 'any' type.
     8 | import { ServiceKeywords } from '../services/keywords.service';
     9 | 
  > 10 | const foo = (object_settings_batch, settingsBatch) => (value) => {
       |              ^
    11 |   if (_.get(settingsBatch, 'name', undefined) == value) return true;
    12 | 
    13 |   return (

[...]

Since there are working builds available from docker, I assume this is a documentation issue. Maybe it will even suffice to specify build prerequisites.

potthast commented 3 years ago

@Kritten Can you comment?

Kritten commented 3 years ago

Hi @zeuner, I know it's far from perfect but just ignore those errors :) All those errors are from eslint, a javascript code linter. Despite the errors you should have a new folder with the compiled frontend at frontend/dist/ after executing the command.

potthast commented 3 years ago

Can we suppress them?

Kritten commented 3 years ago

@zeuner please try to build the master branch again. I updated some packages and removed Eslint and Typescript warnings/errors.

zeuner commented 3 years ago

Thanks, npm run build looks nice and clean now.

The build can be completed. The npm run parcel_annotate_build and npm run parcel_sandbox_hit_build steps throw errors, though:

> mturk@1.0.0 parcel_annotate_build /home/mturk/mturk-manager/frontend
> parcel build ./annotate/index_annotate.ts -d ./dist

error: unknown option '-d'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mturk@1.0.0 parcel_annotate_build: `parcel build ./annotate/index_annotate.ts -d ./dist`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mturk@1.0.0 parcel_annotate_build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mturk/.npm/_logs/2021-07-25T23_29_31_582Z-debug.log

@Kritten Can they also be disregarded?