Angular 6 更新 - 找不到 rxjs-5-to-6-migrate 命令 [英] Angular 6 Update - rxjs-5-to-6-migrate command not found

查看:24
本文介绍了Angular 6 更新 - 找不到 rxjs-5-to-6-migrate 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在从update.angular.io的升级过程中:

使用 rxjs-tslint 自动更新规则删除已弃用的 RxJS 6 功能.

Remove deprecated RxJS 6 features using rxjs-tslint auto update rules.

对于大多数应用程序,这意味着运行以下两个命令:

For most applications this will mean running the following two commands:

npm install -g rxjs-tslint
rxjs-5-to-6-migrate -p src/tsconfig.app.json

但是当我按照这些步骤运行 rxjs-5-to-6-migrate -p src/tsconfig.app.json 我收到错误:

But when I follow these steps and run rxjs-5-to-6-migrate -p src/tsconfig.app.json I'm getting the error:

rxjs-5-to-6-migrate: command not found

是否有任何原因导致此命令不起作用?

Is there any reason why this command isn't working?

推荐答案

我确实让它工作了,我的步骤如下:

I did get it working and my steps are the following:

  1. 在本地安装 rxjs-tslint - cd YOUR_PROJECT_DIR &&npm i rxjs-tslint.
  2. 然后从您的项目根目录运行 node_modules/.bin/rxjs-5-to-6-migrate -p PATH_TO_YOUR_TSCONFIG.json.
  3. 如果您收到类似 rxjs-tslint/node_modules/.bin/tslint: not found 的错误消息,请执行 cd node_modules/rxjs-tslint &&npm install 并重复第 2 步.
  1. Install rxjs-tslint locally - cd YOUR_PROJECT_DIR && npm i rxjs-tslint.
  2. Then run from your project root node_modules/.bin/rxjs-5-to-6-migrate -p PATH_TO_YOUR_TSCONFIG.json.
  3. If you get an error saying something like rxjs-tslint/node_modules/.bin/tslint: not found, then do cd node_modules/rxjs-tslint && npm install and repeat the step 2.

这篇关于Angular 6 更新 - 找不到 rxjs-5-to-6-migrate 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆