Tests fail when run locally
mccalluc opened this issue · 3 comments
mccalluc commented
- Release number or git hash: 1673750
Steps to reproduce
Following the instructions on the README, npm install
seems to work, but npm test
does not.
Observed behavior
phovea_vis$ brew upgrade npm # To make sure I have the latest.
Error: npm 7.2.1 already installed
phovea_vis$ brew upgrade node
Error: node 7.2.1 already installed
phovea_vis$ npm test
> phovea_vis@0.0.1-SNAPSHOT pretest /Users/chuck/github/phovea/phovea_vis
> npm run compile
> phovea_vis@0.0.1-SNAPSHOT compile /Users/chuck/github/phovea/phovea_vis
> tsc
../phovea_d3/src/d3util.ts(9,21): error TS2307: Cannot find module 'd3'.
../phovea_d3/src/tooltip.ts(6,21): error TS2307: Cannot find module 'd3'.
src/distribution.ts(190,21): error TS2345: Argument of type '(number | IHistogram)[]' is not assignable to parameter of type 'number[]'.
Type 'number | IHistogram' is not assignable to type 'number'.
Type 'IHistogram' is not assignable to type 'number'.
src/distribution.ts(529,20): error TS2345: Argument of type '(number | IHistogram)[]' is not assignable to parameter of type 'number[]'.
Type 'number | IHistogram' is not assignable to type 'number'.
Type 'IHistogram' is not assignable to type 'number'.
src/distribution.ts(538,22): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "run" "compile"
npm ERR! node v7.2.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! phovea_vis@0.0.1-SNAPSHOT compile: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the phovea_vis@0.0.1-SNAPSHOT compile script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phovea_vis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs phovea_vis
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls phovea_vis
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/chuck/github/phovea/phovea_vis/npm-debug.log
npm ERR! Test failed. See above for more details.
phovea_vis$ cat /Users/chuck/github/phovea/phovea_vis/npm-debug.log
cat: /Users/chuck/github/phovea/phovea_vis/npm-debug.log: No such file or directory
Expected behavior
- Tests pass locally
- Tests are run and pass on Travis: Currently we only have
script: npm run dist
mccalluc commented
I'm going to bounce over to the phovea_d3 to make sure it works, but off-hand really not sure how to handle the histogram issues.
mccalluc commented
Last travis run did seem to work: https://travis-ci.org/phovea/phovea_vis
mccalluc commented
I'm guessing this was related to problems with the TS version. Works now locally, so closing.