angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng2-material installation failed {typings: not found}

Open codejith opened this issue 10 years ago • 5 comments

I am using latest version of angular-cli and i tried to install ng2-material am getting the following error.

zerocool@leox:~/workspace/workout/MaterialTest$ sudo npm install --save ng2-material @angular2-material/core sudo: unable to resolve host leox [sudo] password for zerocool:

[email protected] postinstall /home/zerocool/workspace/workout/MaterialTest/node_modules/ng2-material typings install

sh: 1: typings: not found [email protected] /home/zerocool/workspace/workout/MaterialTest +-- UNMET PEER DEPENDENCY @angular/[email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] +-- UNMET PEER DEPENDENCY @angular/[email protected] `-- @angular2-material/[email protected]

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: [email protected] npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular2-material/[email protected] requires a peer of @angular/forms@^0.1.0 but none was installed. npm WARN [email protected] requires a peer of grunt@>=0.4.0 but none was installed. npm ERR! Linux 4.4.0-38-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "ng2-material" "@angular2-material/core" npm ERR! node v6.6.0 npm ERR! npm v3.10.3 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

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

npm ERR! Please include the following file with any support request: npm ERR! /home/zerocool/workspace/workout/MaterialTest/npm-debug.log

codejith avatar Oct 08 '16 06:10 codejith

ng2-material seems like an unofficial try to implement Material in Angular 2. Their Github READM showing in their NPM page has all tests broken.

The official Angular 2 Material package is called @angular/material.

For learning how to use the official Angular 2 Material check: https://github.com/angular/material2/blob/master/GETTING_STARTED.md

Apart from that

Assuming you do mean to install those particular packages you mentioned...

The problem seems to be that the package has a postinstall script that runs typings install. In that case, the package itself should have mentioned that it's dependent on typings, otherwise, it might be expecting you to have typings installed globally.

Either way, this wouldn't be a CLI issue.

Meligy avatar Oct 08 '16 09:10 Meligy

The problem am facing with the official Material 2 is i can't find anything like Responsive grid layout

codejith avatar Oct 08 '16 13:10 codejith

That's alright. The other thing is that this seems to be a problem with ng2-material requiring typings. You can install typings manually and solve the ng2-material specific problem. This is not Angular CLI issue.

typings was a CLI package manager for TypeScript definitions. Now there's an official way to load these in TypeScript 2 that uses NPM, and doesn't need typings. The Angular CLI uses TypeScript 2. You can still install typings manually and point to the typings-installed definitions from your tsconfig. But all of that is not an Angular CLI issue.

Meligy avatar Oct 08 '16 14:10 Meligy

Libraries really shouldn't have a postinstall: typings install hook - it messes with consumers. There isn't anything that can be done on the CLI side about it.

filipesilva avatar Oct 10 '16 12:10 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.