leewinder / ng2-file-drop

An Angular module for simple desktop file drag and drop with automatic file validation and dynamic style adjustment.
MIT License
28 stars 26 forks source link

typings: not found #7

Closed madoar closed 7 years ago

madoar commented 7 years ago

Hi, when I'm trying to install ng2-file-drop via npm install ng2-file-drop --save I get the following error message:

marc@marc-desktop ~/WebstormProjects/AngularTest $ npm install ng2-file-drop --save

> tslerp@1.0.4 postinstall /home/marc/WebstormProjects/AngularTest/node_modules/tslerp
> typings install

sh: 1: typings: not found
angular-test@0.0.0 /home/marc/WebstormProjects/AngularTest
├── UNMET PEER DEPENDENCY @angular/compiler@2.4.1
├── UNMET PEER DEPENDENCY @angular/core@2.4.1
├── UNMET PEER DEPENDENCY rxjs@5.0.0-beta.12
└── UNMET PEER DEPENDENCY zone.js@0.6.26

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15
npm WARN @angular/core@2.4.1 requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN @angular/core@2.4.1 requires a peer of zone.js@^0.7.2 but none was installed.
npm WARN @angular/http@2.4.1 requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN @angular/router@3.4.1 requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN codelyzer@1.0.0-beta.4 requires a peer of @angular/compiler@~2.2.0 but none was installed.
npm WARN codelyzer@1.0.0-beta.4 requires a peer of @angular/core@~2.2.0 but none was installed.
npm ERR! Linux 4.4.0-53-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "ng2-file-drop" "--save"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! tslerp@1.0.4 postinstall: `typings install`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the tslerp@1.0.4 postinstall 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 tslerp 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 tslerp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tslerp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/marc/WebstormProjects/AngularTest/npm-debug.log
npm ERR! code 1

I'm using Linux Mint 18.1 as my OS.

leewinder commented 7 years ago

Hi Madoar, as there is a dependancy on tsLerp, there is an implicit dependancy on typings.

Run the following before hand to install Typings and then it'll install just fine npm install typings --global

Thanks

madoar commented 7 years ago

Hi leewinder, thanks for your feedback. I would refrain from requiring to install a software globally to use a component library in a development project.

I'm not sure why a dependency to typings is needed? In my understanding typings enables you to install typescript type declarations via console, right? Why don't you just add the type declarations dependencies directly to your project.json file? As far as I know this would have the same result and doesn't require the user to install a software globally on his computer. As far as I understand your typings.json file, it should be enough to add the following dependencies to your project.json file as development dependencies:

fabn commented 7 years ago

Hi @leewinder this issue broke our CI environment because of the missing global command. Could you please reconsider this issue?

Maybe change your postinstall script to use node_modules/.bin/typings instead of relying on global command.

leewinder commented 6 years ago

Typings dependency dropped in ng2-file-drop v5.0.0 https://www.npmjs.com/package/ng2-file-drop