sillitoe / cath-cluster-ng2

Web component to view collections of protein sequences and structures
0 stars 1 forks source link

How to get npm #1

Open nataliedawson opened 7 years ago

nataliedawson commented 7 years ago

As a new user of Node.js, I wasn't sure where to get npm from. I think it would be useful to add this link in to show users where to download it from: https://nodejs.org/en/download/.

sillitoe commented 7 years ago

Good point, thanks.

This might be more useful for npm stuff specifically (rather than nodejs)

https://docs.npmjs.com/getting-started/what-is-npm

Installing npm modules locally (without sudo) is very useful.

https://docs.npmjs.com/getting-started/fixing-npm-permissions

Fancy making a pull request for the documentation change?

nataliedawson commented 7 years ago

Yep thanks, I'll have a go at integrating that into the README.md and making a pull request.

Also, when trying 'npm install' it seemed to work fine in that it added 583 packages:

$ npm install
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> fsevents@1.1.2 install /Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/fsevents
> node install

[fsevents] Success: "/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-alpha.30 requires a peer of @angular/core@^4.0.3 but none was installed.
npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-alpha.30 requires a peer of @angular/common@^4.0.3 but none was installed.
npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-alpha.30 requires a peer of @angular/forms@^4.0.3 but none was installed.

added 583 packages in 23.886s

But then when I tried 'npm start' it seemed to complain about 'Renderer2' a lot and failed to start. I wasn't sure whether it could be something I've done wrong with the set up on my laptop.

$ npm start

> cath-cluster-view@0.0.1 prestart /Users/nataliewillhoft/work/cath-cluster-ng2
> npm run build

> cath-cluster-view@0.0.1 build /Users/nataliewillhoft/work/cath-cluster-ng2
> tsc -p src/

node_modules/@ng-bootstrap/ng-bootstrap/buttons/radio.d.ts(1,10): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-input.d.ts(1,40): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/modal/modal-window.d.ts(1,36): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/popover/popover.d.ts(1,53): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/tooltip/tooltip.d.ts(1,53): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.d.ts(1,99): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/@ng-bootstrap/ng-bootstrap/util/popup.d.ts(1,60): error TS2305: Module '"/Users/nataliewillhoft/work/cath-cluster-ng2/node_modules/@angular/core/index"' has no exported member 'Renderer2'.
node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class 'Subject<T>' incorrectly extends base class 'Observable<T>'.
  Types of property 'lift' are incompatible.
    Type '<R>(operator: Operator<T, R>) => Observable<T>' is not assignable to type '<R>(operator: Operator<T, R>) => Observable<R>'.
      Type 'Observable<T>' is not assignable to type 'Observable<R>'.
        Type 'T' is not assignable to type 'R'.
src/litemol/js/LiteMol-plugin.d.ts(10064,11): error TS2559: Type 'Component<P, S>' has no properties in common with type 'ComponentLifecycle<P, S>'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! cath-cluster-view@0.0.1 build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the cath-cluster-view@0.0.1 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/nataliewillhoft/.npm/_logs/2017-08-03T21_22_38_099Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! cath-cluster-view@0.0.1 prestart: `npm run build`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the cath-cluster-view@0.0.1 prestart 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/nataliewillhoft/.npm/_logs/2017-08-03T21_22_38_131Z-debug.log

Have you seen this kind of error before?

Thanks, Natalie

On 3 August 2017 at 22:38, Ian Sillitoe notifications@github.com wrote:

Good point, thanks.

This might be more useful for npm stuff specifically (rather than nodejs)

https://docs.npmjs.com/getting-started/what-is-npm

Installing npm modules locally (without sudo) is very useful.

https://docs.npmjs.com/getting-started/fixing-npm-permissions

Fancy making a pull request for the documentation change?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sillitoe/cath-cluster-ng2/issues/1#issuecomment-320097365, or mute the thread https://github.com/notifications/unsubscribe-auth/AJuO6LFyA9E8kyiUac9IGi2tTzojK79Kks5sUj3hgaJpZM4OtAuJ .

sillitoe commented 7 years ago

Thanks for the report.

Looks like that error comes from TypeScript trying (and failing) to compile the @ng-bootstrap module.

I've probably forgotten to specify some dependencies in package.json

Guessing it boils down to stopping this error:

npm WARN @ng-bootstrap/ng-bootstrap@1.0.0-alpha.30 requires a peer of @angular/core@^4.0.3 but none was installed.

Probably worth checking, next time you bring your laptop in...