pushkin-consortium / pushkin-cli

A CLI designed to facilitate the setup process of a Pushkin stack
MIT License
0 stars 4 forks source link

Non-basic experiment templates are generating with Archive folder in experiment folders (breaks the process) #72

Closed conbainbridge closed 4 years ago

conbainbridge commented 4 years ago

The file structure when an experiment is installed that is not the basic template:

└── lexicalyay
    ├── Archive
    │   ├── LICENSE
    │   ├── README.md
    │   ├── api\ controllers
    │   │   ├── package-lock.json
    │   │   ├── package.json
    │   │   └── src
    │   │       └── index.js
    │   ├── config.yaml
    │   ├── migrations
    │   │   └── 20180724101122_create_pushkintemplate_stimulusResponses.js
    │   ├── web\ page
    │   │   ├── build
    │   │   │   ├── assets
    │   │   │   │   └── experiment.css
    │   │   │   └── experiment.css
    │   │   ├── node_modules
    │   │   ├── package-lock.json
    │   │   ├── package.json
    │   │   └── src
    │   │       ├── assets
    │   │       │   ├── experiment.css
    │   │       │   ├── logo512.png
    │   │       │   └── pushkin_bw_w_text.png
    │   │       ├── config.js
    │   │       ├── consent.js
    │   │       ├── debrief.js
    │   │       ├── experiment.js
    │   │       ├── index.js
    │   │       └── stim.js
    │   └── worker
    │       ├── Dockerfile
    │       ├── index.js
    │       ├── package-lock.json
    │       ├── package.json
    │       └── start.sh
    └── __MACOSX
        └── Archive
            └── web\ page
                └── src

There is this error during exp template installation:

bainbridge-mbp-2017:pushkin_test2-7-28-20 connie$ node /Users/connie/git/pushkin-BC/pushkin_all/pushkin-cli/build/index.js install experiment
lexical
? What do you want to call your experiment? lexicalyay
lexical
Making lexicalyay in /Users/connie/git/pushkin-BC/pushkin_test2-7-28-20/experiments
retrieving from https://api.github.com/repos/pushkin-consortium/pushkin-exptemplates-lexical/releases/latest
be patient...
finished downloading
Installing npm dependencies for api controllers
Installing npm dependencies for web page
Installing npm dependencies for worker
Error: spawn /bin/sh ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs: [ '-c', 'yarn install' ],
  cmd: 'yarn install',
  stdout: '',
  stderr: ''
}
Error: spawn /bin/sh ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs: [ '-c', 'yarn install' ],
  cmd: 'yarn install',
  stdout: '',
  stderr: ''
}
Error: spawn /bin/sh ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /bin/sh',
  path: '/bin/sh',
  spawnargs: [ '-c', 'yarn install' ],
  cmd: 'yarn install',
  stdout: '',
  stderr: ''
}
jkhartshorne commented 4 years ago

So when you make the archive folder, here's the process:

  1. Download the zip file from the repo
  2. Unzip
  3. cd into the unzipped folder
  4. zip -r Archive.zip *

I think you were missing #3. I made a new version of grammaticality judgment using this process and it works fine.

If that fixes you problem, please update the versions AND also get the above information into the 'dev' section of the docs. Probably in the section on (making) templates.

conbainbridge commented 4 years ago

Fixed up all the exp templates, these seem to be good to go and working well!