无法运行npm install --save angular2-tree-component

时间:2016-08-26 23:59:57

标签: node.js angular npm treeview npm-install

我已尝试安装angular2-tree-component并遇到此故障。 我对这个堆栈仍然没有太多经验,所以我想请求失败的帮助...

    public interface IPet
    {
        string Name { get; set; }
    }

    public class Cat : IPet
    {
        public Cat(string name)
        {
            Name = name;
        }

        public string Name {get; set; }
    }

版本:

    /R/VKS/oryol/oryol_ion   (master)
    $  sudo npm install --save angular2-tree-component
Password:

> angular2-tree-component@1.1.14 postinstall /S/KMR/R/VKS/oryol/oryol_ion/node_modules/angular2-tree-component
> typings install

typings ERR! message Unable to resolve Typings dependencies
typings ERR! caused by Unable to find "typings.json" from "/S/KMR/R/VKS/oryol/oryol_ion/node_modules/angular2-tree-component"

typings ERR! cwd /S/KMR/R/VKS/oryol/oryol_ion/node_modules/angular2-tree-component
typings ERR! system Darwin 15.3.0
typings ERR! command "/usr/local/bin/node" "/S/KMR/R/VKS/oryol/oryol_ion/node_modules/.bin/typings" "install"
typings ERR! node -v v5.7.0
typings ERR! typings -v 0.8.1

typings ERR! If you need help, you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>
npm WARN enoent ENOENT: no such file or directory, open '/S/KMR/R/VKS/oryol/oryol_ion/package.json'
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/common@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/compiler@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/core@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/http@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/platform-browser@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of @angular/platform-browser-dynamic@^2.0.0-rc.3 but none was installed.
npm WARN angular2-tree-component@1.1.14 requires a peer of zone.js@^0.6.12 but none was installed.
npm WARN oryol_ion No description
npm WARN oryol_ion No repository field.
npm WARN oryol_ion No README data
npm WARN oryol_ion No license field.
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "angular2-tree-component"
npm ERR! node v5.7.0
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /S/KMR/R/VKS/oryol/oryol_ion/npm-debug.log

我应该使用哪个版本?

不应该以某种方式将所需版本声明为依赖项吗?

1 个答案:

答案 0 :(得分:0)

解决方案:看起来我正在从错误的目录(正确目录的父目录)运行命令行。

在正确的目录中重新运行:

make