mcomella / apt_github_improvements

A browser extension to add features to GitHub for the Android Product Team (APT) at Mozilla
Mozilla Public License 2.0
3 stars 0 forks source link

Dependencies with breaking changes are getting installed (npm run build fails with tsc errors) #41

Closed Sdaswani closed 5 years ago

Sdaswani commented 5 years ago

Following the README, 'npm install' isn't running.

Lets-Go-Mets:apt_github_improvements sdaswani$ node --version
v10.15.2
Lets-Go-Mets:apt_github_improvements sdaswani$ npm install
audited 19 packages in 0.494s
found 0 vulnerabilities

Lets-Go-Mets:apt_github_improvements sdaswani$ npm run build

> apt_github_improvements@ build /Users/sdaswani/Code/apt_github_improvements
> tsc -p src/contentScript && tsc -p src/options && ./scripts/build_supplement.sh

src/contentScript/github/githubDom.ts:51:9 - error TS2322: Type 'Set<unknown>' is not assignable to type 'Set<number>'.
  Type 'unknown' is not assignable to type 'number'.

51         return issueNums;
           ~~~~~~~~~~~~~~~~~

src/contentScript/github/githubParser.ts:17:9 - error TS2322: Type 'Set<unknown>' is not assignable to type 'Set<number>'.

17         return issueNumbers;
           ~~~~~~~~~~~~~~~~~~~~

Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! apt_github_improvements@ build: `tsc -p src/contentScript && tsc -p src/options && ./scripts/build_supplement.sh`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the apt_github_improvements@ 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!     /Users/sdaswani/.npm/_logs/2019-07-09T21_53_06_365Z-debug.log

Log file is attached: 2019-07-09T21_53_06_365Z-debug.log

mcomella commented 5 years ago

I declared the node dependencies incorrectly so a newer version of Typescript with breaking changes was getting installed.

@Sdaswani This should be fixed on the latest master. Note that you may need to remove your node_modules folder to try again:

rm -rf node_modules
npm install
npm run build
Sdaswani commented 5 years ago

WFM, thanks @mcomella !