typescript: typings ERR! message Attempted to compile "angular-animate" as a global module, but it looks like an external module
mzhua opened this issue · 4 comments
when exec "npm install" , it shows the error.
Here is the detail log
verbose lifecycle material-start@1.0.0postinstall: CWD: /Users/hua/WebProjects/material-startpostinstall: Args: [ '-c',
67 silly lifecycle material-start@1.0.0
67 silly lifecycle 'typings install dtjquery dtangular dtangular-animate dtangular-material --global --save' ]
68 silly lifecycle material-start@1.0.0postinstall: Returned: code: 1 signal: nullpostinstall: Failed to exec postinstall script
69 info lifecycle material-start@1.0.0
70 verbose stack Error: material-start@1.0.0 postinstall: typings install dt~jquery dt~angular dt~angular-animate dt~angular-material --global --save
70 verbose stack Exit status 1
70 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
70 verbose stack at emitTwo (events.js:106:13)
70 verbose stack at EventEmitter.emit (events.js:194:7)
70 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
70 verbose stack at emitTwo (events.js:106:13)
70 verbose stack at ChildProcess.emit (events.js:194:7)
70 verbose stack at maybeClose (internal/child_process.js:899:16)
70 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
71 verbose pkgid material-start@1.0.0
72 verbose cwd /Users/hua/WebProjects/material-start
73 error Darwin 16.5.0
74 error argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "install"
75 error node v7.9.0
76 error npm v4.2.0
77 error code ELIFECYCLE
78 error errno 1
79 error material-start@1.0.0 postinstall: typings install dt~jquery dt~angular dt~angular-animate dt~angular-material --global --save
79 error Exit status 1
80 error Failed at the material-start@1.0.0 postinstall script 'typings install dtjquery dtangular dtangular-animate dtangular-material --global --save'.
80 error Make sure you have the latest version of node.js and npm installed.
80 error If you do, this is most likely a problem with the material-start package,
80 error not with npm itself.
80 error Tell the author that this fails on your system:
80 error typings install dtjquery dtangular dtangular-animate dtangular-material --global --save
80 error You can get information on how to open an issue for this project with:
80 error npm bugs material-start
80 error Or if that isn't available, you can get their info via:
80 error npm owner ls material-start
80 error There is likely additional logging output above.
81 verbose exit [ 1, true ]
@mzhua did you resolved this and how? I just started with AngularJS, attempted to install Material from this repo, and ended with same result after 30 seconds - quick experience xD.
EDIT: I've edited scripts: postinstall
in package.json
to:
"postinstall": "typings install dt~jquery --global --save && typings install dt~angular-animate dt~angular-material dt~angular --save"
and npm install
passed sucessfully. After that, I had to npm install live-server
to run app with live-server --open=app
change the scripts declaration in the package.json file to remove the --global tag and also remove jquery from the list.
the scripts declaration should look like this now...
"scripts": {
"postinstall": "typings install dt~angular dt~angular-animate dt~angular-material --save"
}