Reputation: 6527
In the upgrade process from update.angular.io:
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
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?
Upvotes: 25
Views: 20926
Reputation: 1
Having this issues when executing the command
npx rxjs-tslint -p src/tsconfig.app.json
Running the automatic migrations. Please, be patient and wait until the execution completes.
Invalid option for project: src/tsconfig.app.json Error while running the migration: ,,Invalid option for project: src/tsconfig.app.json
Upvotes: 0
Reputation: 21762
When I got this, I had to follow the following steps. They took me a while to figure out, so I figure I should share them here:
npm install rxjs-tslint
cd node_modules/rxjs-tslint
npm install
cd
back out of your node_modules
directory, back to your project homerxjs-5-to-6-migrate -p ./tsconfig.json
On step #5 you make need to change the path to point to your tsconfig.json
file. But that is where mine was. It finally worked!
Hope it works for you like it worked for me.
Upvotes: 11
Reputation: 1253
I did get it working and my steps are the following:
rxjs-tslint
locally - cd YOUR_PROJECT_DIR && npm i rxjs-tslint
.node_modules/.bin/rxjs-5-to-6-migrate -p PATH_TO_YOUR_TSCONFIG.json
.rxjs-tslint/node_modules/.bin/tslint: not found
, then do cd node_modules/rxjs-tslint && npm install
and repeat the step 2.Upvotes: 55
Reputation: 3052
Follow the instruction to install the dependency globally then try using the full path to the file rxjs-5-to-6-migrate.
For example:
/usr/local/lib/node_modules/rxjs-tslint/bin/rxjs-5-to-6-migrate -p src/tsconfig.app.json
If you don't know where the dependencies are stored on your computer you can run npm root -g
Upvotes: 3