rxjs - RxJs-5-to-6-migrate 崩溃
问题描述
我正在尝试将我的项目从 Angular 4 更新到 Angular 6。我按照 Angular 网站上的更新步骤进行操作,一切进展顺利。但是,当尝试使用 rxjs-5-to-6-migrate 脚本时,它会崩溃。
我尝试了各种不同的路径,但似乎没有任何效果。
我不知道发生了什么事...
PS D:\workspace\project> rxjs-5-to-6-migrate -p src/tsconfig.app.json
Running the automatic migrations. Please, be patient and wait until the execution completes.
child_process.js:615
throw err;
^
Error: Command failed: "d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\node_modules\.bin\tslint" -c "d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.json" -p "src/tsconfig.app.json" --fix
at checkExecSyncError (child_process.js:575:11)
at Object.execSync (child_process.js:612:13)
at migrate (d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.js:18:34)
at Object.<anonymous> (d:\Applications\node-v9.11.1-win-x64\node_modules\rxjs-tslint\rxjs-5-to-6-migrate.js:25:14)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
解决方案
显然,这是一个过时的依赖项(可能是 tslint)导致了这种情况。更新 package.json 中的所有依赖项后,它工作了。