Error when running rxjs-5-to-6-migrate
See original GitHub issueInstalled rxjs-tslint
globally, attempting to upgrade my Angular application from version 5 to 6.
I’m using the command
rxjs-5-to-6-migrate -p src/tsconfig.app.json
But it results in this error
Running the automatic migrations. Please, be patient and wait until the execution completes.
child_process.js:644
throw err;
^
Error: Command failed: /usr/lib/node_modules/rxjs-tslint/node_modules/.bin/tslint -c /usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.json -p src/tsconfig.app.json --fix
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at migrate (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:18:34)
at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:25:14)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
There are no spaces in the path to any of the files.
I have tried specifying the full path to tsconfig.app.json
, same result.
Linux Kubuntu 18.04 Node 8.11.1 NPM 6.0.0 Installed packages:
/usr/lib
├── @angular/cli@6.0.0
├── npm@6.0.0
├── rxjs-tslint@0.1.3
├── tslint@5.10.0
└── typescript@2.7.2
Issue Analytics
- State:
- Created 5 years ago
- Reactions:21
- Comments:31
Top Results From Across the Web
Angular 6 Update - rxjs-5-to-6-migrate command not found
run npm install rxjs-tslint · run cd node_modules/rxjs-tslint · run npm install · cd back out of your node_modules directory, back to your...
Read more >Angular 5 to 6 Upgrade Migration with Error Fixes
Switch HtpModule and Http to HttpClientModule and HttpClient · Make sure you're using Node 8 or later · Run the commands · ng...
Read more >Using "rxjs-5-to-6-migrate -p src/tsconfig.app.json" - Reddit
Using "rxjs-5-to-6-migrate -p src/tsconfig.app.json". UPDATE Nevermind, install with NPM makes this work. Does anyone know why the below may ...
Read more >Error when running rxjs-5-to-6-migrate - Bountysource
Error when running rxjs -5-to-6-migrate ... Installed rxjs-tslint globally, attempting to upgrade my Angular application from version 5 to 6. I'm ...
Read more >Guide to update your Angular application v6.0 -> v12.0 for ...
You can't run ng update to update Angular applications more than one major version at a time. ... rxjs-5-to-6-migrate -p src/tsconfig.app.json.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you run an
npm install
from inside the rxjs-tslint package’s directory, it’ll make sure it hastslint
available. No need to be gross and install something globally.cd node_modules/rxjs-tslint
npm install
cd ../..
./node_modules/.bin/rxjs-5-to-6-migrate -p src/tsconfig.app.json
For bonus points, use
npx
to access the binary (I found out recently it ships with npm):npx rxjs-5-to-6-migrate -p src/tsconfig.app.json
In Angular Update Guide | 5.2 -> 6.0 for Advanced Apps checklist step
Choose a value of off for preserveWhitespaces in your tsconfig.json to gain the benefits of this setting while the default is still to preserve whitespace.
causes the problem.Running
rxjs-5-to-6-migrate -p ./src/tsconfig.app.json
(no matter global or local installed) an error occurred:executing
project_path/node_modules/rxjs-tslint/node_modules/.bin/tslint -c "project_path/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.json" -p "./src/tsconfig.app.json" --fix
we get:tsconfig.json(10,5): error TS5023: Unknown compiler option 'preserveWhitespaces'.
so removing
preserveWhitespaces
solved the problem for me