nwfsc-fram / boatnet

At-Sea Field Data Collection Software Components for Scientific Surveys and Observers
8 stars 5 forks source link

Failed Build #269

Closed sethgerou-noaa closed 5 years ago

sethgerou-noaa commented 5 years ago

Unable to build master (with Lerna Run Build), even from a brand new clone.
Experiencing this issue on both Window 10 and Linux (VM on same machine).

Fails on building bn-models with error below: lerna ERR! yarn run build exited 1 in '@boatnet/bn-models' lerna ERR! yarn run build stdout: yarn run v1.13.0 $ tsc index.ts -d --module commonjs --outDir dist/ models/_base/base-event.ts(4,23): error TS2307: Cannot find module 'geojson'. models/_common/certificate.ts(1,22): error TS2307: Cannot find module '../_base'. models/_common/contact.ts(1,22): error TS2307: Cannot find module '../_base'. models/_common/program.ts(1,22): error TS2307: Cannot find module '../_base'. models/_common/vessel.ts(4,22): error TS2307: Cannot find module '../_base'. models/wcgop/wcgop-basket.ts(2,29): error TS2307: Cannot find module '../_common'. models/wcgop/wcgop-sighting-event.ts(1,75): error TS2307: Cannot find module '../_common'. models/wcgop/wcgop-specimen.ts(1,30): error TS2307: Cannot find module '../_base'. models/wcgop/wcgop-specimen.ts(3,29): error TS2307: Cannot find module '../_common'. models/_base/base-specimen.ts(19,9): error TS4033: Property 'sex' of exported interface has or is using private name 'Sex'. models/_base/base-specimen.ts(23,15): error TS4033: Property 'viability' of exported interface has or is using private name 'Viability'. models/_base/base-specimen.ts(24,15): error TS4033: Property 'lifeStage' of exported interface has or is using private name 'LifeStage'. models/_base/base-specimen.ts(25,16): error TS4033: Property 'population' of exported interface has or is using private name 'Population'. models/_base/base-specimen.ts(26,14): error TS4033: Property 'maturity' of exported interface has or is using private name 'Maturity'. models/_base/base-specimen.ts(33,14): error TS4033: Property 'protocol' of exported interface has or is using private name 'Protocol'. models/_common/biostructure.ts(16,18): error TS4033: Property 'structureType' of exported interface has or is using private name 'BiostructureType'. models/wcgop/wcgop-catch-species.ts(26,14): error TS4033: Property 'handling' of exported interface has or is using private name 'RockfishHandlingCode'. models/wcgop/wcgop-operation.ts(28,20): error TS4033: Property 'targetStrategy' of exported interface has or is using private name 'WcgopTargetStrategy'. models/wcgop/wcgop-specimen.ts(14,21): error TS4033: Property 'biosampleMethod' of exported interface has or is using private name 'WcgopBiosampleMethod'. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr: error Command failed with exit code 2.

lerna ERR! yarn run build exited 1 in '@boatnet/bn-models' lerna WARN complete Waiting for 3 child processes to exit. CTRL-C to exit immediately.

sethgerou-noaa commented 5 years ago

@wsmith-nwfsc

ghost commented 5 years ago

This is an amazing seth-only bug.

My new VM, didn't even have node on it, works:

  503  curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
  504  sudo apt-get install -y nodejs
  506  sudo npm install -g typescript
  507  sudo npm install -g yarn@1.13.0
  508  sudo npm install -g lerna@3.13.1
  509  ls
  510  git clone https://github.com/nwfsc-fram/boatnet
  511  cd boatnet
  512  lerna bootstrap && lerna clean -y
  513  lerna run build
sethgerou-noaa commented 5 years ago

tried commenting out in base-event.ts... import { Point } from 'geojson'; // GeoJSON https://tools.ietf.org/html/rfc7946 and replaced location?: Point; with location?: any: re-ran lerna run build. still failed so reverted to previous code, then ran lerna clean -y and lerna run build, and everything built properly.

Suspect running lerna clean -y was working properly whereas lerna clean and then y at the prompt was not.

Thanks @wsmith-nwfsc for all your help with this! clean -y ftw!