【问题标题】:I'm having trouble with npm install for angular 2我在使用 npm install for angular 2 时遇到问题
【发布时间】:2016-11-07 14:38:02
【问题描述】:

这是我在 cmd 提示符下遇到的错误:

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
 > angular2-quickstart@1.0.0 postinstall C:\Users\hp\Desktop\angular2-seed
 > typings install

'typings' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm WARN angular2-quickstart@1.0.0 No description
npm WARN angular2-quickstart@1.0.0 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" 
"C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.7
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-quickstart@1.0.0 postinstall: `typings install`
npm ERR! Exit status 1
npm ERR!

npm ERR! Failed at the angular2-quickstart@1.0.0 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-quickstart 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-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\hp\Desktop\angular2-seed\npm-debug.log

【问题讨论】:

  • 尝试先安装类型npm install typings --global
  • @maxisam 现在我得到了这个:C:\Users\hp\Desktop\angular2-seed>npm install > angular2-quickstart@1.0.0 postinstall C:\Users\hp\Desktop\ angular2-seed > typings install └──(无依赖项)npm WARN 可选跳过失败的可选依赖项/chokidar/fsevents:npm WARN notsup 与您的操作系统或架构不兼容:fsevents@1.0.12 npm WARN angular2-quickstart@1.0。 0 没有描述 npm WARN angular2-quickstart@1.0.0 没有存储库字段。
  • 我现在运行 npm start 并且它正在工作,非常感谢@maxisam!

标签: node.js angular npm-install


【解决方案1】:

您需要全局安装类型: - npm i typings -g

【讨论】:

    【解决方案2】:

    当你看到

    'typings' 不是内部或外部命令、可运行程序 > 或批处理文件。

    尝试先安装类型npm install typings --global

    【讨论】:

      猜你喜欢
      • 2019-12-24
      • 2019-11-24
      • 2021-10-16
      • 2020-09-24
      • 2017-09-10
      • 1970-01-01
      • 2020-02-08
      • 2021-08-02
      • 2018-06-16
      相关资源
      最近更新 更多