angular / angular-electron

Angular2 + Electron
605 stars 115 forks source link

npm run typings install will not work without typings #12

Closed achekulaev closed 7 years ago

achekulaev commented 8 years ago

npm setup will fail without typings package.

$ npm run setup
> @angular2/electron@1.0.0 setup /Users/alexei.chekulaev/Dropbox/Work/nw/angular-electron-master
> npm install --no-optional && npm run typings-install
npm WARN @angular2/electron@1.0.0 requires a peer of angular2@2.0.0-beta.12 but none was installed.
> @angular2/electron@1.0.0 typings-install /Users/alexei.chekulaev/Dropbox/Work/nw/angular-electron-master
> typings install
sh: typings: command not found
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/5.10.0/bin/node" "/usr/local/bin/npm" "run" "typings-install"
npm ERR! node v5.10.0
npm ERR! npm  v3.8.3
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @angular2/electron@1.0.0 typings-install: `typings install`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @angular2/electron@1.0.0 typings-install script 'typings install'.
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 @angular2/electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs @angular2/electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls @angular2/electron
npm ERR! There is likely additional logging output above.

Installing typing with npm install typings --global fixes the problem

$ npm run setup
> @angular2/electron@1.0.0 setup /Users/alexei.chekulaev/Dropbox/Work/nw/angular-electron-master
> npm install --no-optional && npm run typings-install
npm WARN @angular2/electron@1.0.0 requires a peer of angular2@2.0.0-beta.12 but none was installed.
> @angular2/electron@1.0.0 typings-install /Users/alexei.chekulaev/Dropbox/Work/nw/angular-electron-master
> typings install
├── es6-shim (ambient)
├── github-electron (ambient)
└── node (ambient)

Probably it should be a dependency or explained in README

achekulaev commented 7 years ago

Nothing seems to happen. Probably worth closing then

najamelan commented 7 years ago

Nothing seems to happen. Probably worth adding the extra command to the readme then? Btw I had to run it as root.