Comments (31)
If you run an npm install
from inside the rxjs-tslint package's directory, it'll make sure it has tslint
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
from rxjs-tslint.
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:
./node_modules/.bin/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:644
throw err;
^
Error: Command failed: "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
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at migrate (project_path/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:18:34)
at Object.<anonymous> (project_path/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)
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
from rxjs-tslint.
@cbchenoweth thanks for sharing! In such case, you should be able to workaround the issue by running:
npm i -g tslint
from rxjs-tslint.
@cbchenoweth correct
from rxjs-tslint.
@melodysummer
If you want to run the "rxjs-5-to-6-migrate" command, I think you must also install this package globally.
So:
npm install -g rxjs-tslint
Alternatively, you can just configure the tsLint rules in your project as described in the readme:
https://github.com/ReactiveX/rxjs-tslint/blob/master/README.md#use-rules
from rxjs-tslint.
I have the same issue.
Windows 10
Node 8.9.4
NPM 5.6.0
[email protected]
[email protected]
[email protected]
from rxjs-tslint.
Same thing also on windows
Windows 10
Node 9.3.0
NPM 6.0.0
[email protected]
[email protected]
[email protected]
from rxjs-tslint.
I think the problem is another one.
Look at into the /src if the name file is ''tsconfig.app.json" or is "tsconfig.json"
In my case, i only changed to correct name.
from rxjs-tslint.
On macOS it's the same
macOS 10.13.4
Node 9.3.0
npm 6.0.0
[email protected]
[email protected]
[email protected]
from rxjs-tslint.
After installing tslint, typescript globally and locally - despite of false npm warnings about typescript missing - rxjs-5-to-6-migrate -p src/tsconfig.app.json helped. Documentation is bad - "rxjs-5-to-6-migrate -p [path/to/tsconfig.json]" is bad description. Cannot use tsconfig.json, cannot use "rxjs-5-to-6-migrate -p" without optional path. Have to use rxjs-5-to-6-migrate -p src/tsconfig.app.json.
Correct documentation.
from rxjs-tslint.
Please check path of tsconfig.json. In my case it was src/tsconfig.app.json but i changed it to src/client/tsconfig.json and its working.
So i did 2 changes
- correct name of tsconfig.json (removed app)
- correct path of this file
from rxjs-tslint.
@mgechev ok, so, just to make sure my understanding is correct:
The command "rxjs-5-to-6-migrate" is essentially just doing a "tslint --fix"?
So, as long as I did the steps to set up the rules directly in my tslint.json,
the command is really not needed?
from rxjs-tslint.
Ach hate these. One blog says run this
, it doesn't work and the creators have no idea.
For a start it says run it against src/tsconfig.app.json
But that file does not get generated by ng-cli there, it generates:
src/tsconfig.json
src/app/tsconfig.app.json
src/app/tsconfig.spec.json
So which is it? FWIW ALL fail the same way and nothing suggested thus far solves it.
Love a simple upgrade path!
from rxjs-tslint.
Install globally as described in readme or use npx: npx rxjs-5-to-6-migrate -p src/tsconfig.app.json
Please close this issue as it works as described in readme.
from rxjs-tslint.
For me, running the failed command mentioned in the error manually, e.g. /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
, revealed me the real error.
For me, it was a messed up tsconfig.json: tsconfig.json(11,3): error TS5023: Unknown compiler option 'preserveWhitespaces'
from rxjs-tslint.
@ziacik Thanks, your solution worked for me, running the failed command showed the actual error and now it is running :)
However, this is what the angular update guide says which is why I added it in the first place, something doesn't add up, as it seems like this is not a valid option in the tsconfig file
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.
from rxjs-tslint.
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.1. `cd node_modules/rxjs-tslint` 2. `npm install` 3. `cd ../..` 4. `./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
Why it is necessary to call 'npm install' inside the 'node_modules/rxjs-tslint' folder? It works. But i dont understand why. When i call npm install rxjs-tslint, i assume, that all dependecies will be installed.
Can you explain me this, please?
from rxjs-tslint.
I have this issue also when I try to update my Angular5 project to V7. After I tried all the above but still can't get any thing done.
Finally I found some clue other where, you should update your typescript globally as well, that seems works for me.
Clue here: #49
from rxjs-tslint.
same issue for me, Win7, node64 (8.11.x)
c:\tools\npm
+-- @angular/[email protected]
+-- @compodoc/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
also tested with node32 (8.11.x) et node64 (10.1.0), same issue
from rxjs-tslint.
Same error here.
Looking at the error stack, I think this is the culprit:
This is on version 0.1.3
from rxjs-tslint.
@mgechev thanks for the tip, will try that.
In general I try to avoid global installs,
easier to make sure that everything is set up right in the project.
(since, when it gets run through CI pipeline, there will be no globals)
I assume this is still something that should be fixed?
from rxjs-tslint.
@cbchenoweth you don't have to use a global binary. Since these are tslint rules, you can apply them with local tslint installation & the config from the repo.
The global just makes it more convenient to use.
from rxjs-tslint.
so how to resolve the problem?
I also met with the running error..
It didn't work after running "npm i -g tslint"
from rxjs-tslint.
thanks @cbchenoweth i'll try that
from rxjs-tslint.
I am experiencing the same error.
Windows 10
Node 9.3.0
NPM 6.0.0
[email protected]
[email protected]
[email protected]
from rxjs-tslint.
I can see a few solutions to the problem here.
from rxjs-tslint.
I'm getting 'Cannot find any possible migrations' after running the migration command
from rxjs-tslint.
@candidJ did you ever fix that or did you have to re-write every sibscribe by hand? (I'm getting the same output)
from rxjs-tslint.
I think the problem is another one.
Look at into the /src if the name file is ''tsconfig.app.json" or is "tsconfig.json"
In my case, i only changed to correct name.
this guy is a genius
from rxjs-tslint.
Hi,
I have a problem when I execute the command :
./node_modules/.bin/rxjs-5-to-6-migrate -p src/tsconfig.app.json
I have the following error (in french) :
Running the automatic migrations. Please, be patient and wait until the execution completes.
Le chemin d'accès spécifié est introuvable.
Error while running the migration: ,,Le chemin d'accès spécifié est introuvable.
This file exists...
Do you have an idea to help me ?
Thank you for the help
from rxjs-tslint.
@cbchenoweth thanks for sharing! In such case, you should be able to workaround the issue by running:
npm i -g tslint
This worked for me
thanks
from rxjs-tslint.
Related Issues (20)
- Cannot read property 'getText' of undefined HOT 2
- Error: Cannot find module 'typescript' HOT 1
- javascript migration guide HOT 1
- rxjs-5-to-6-migrate - cannot find any possible migration HOT 5
- Error: Cannot find module 'typescript' HOT 14
- rxjs-5-to-6-migrate HOT 1
- Extra comma being added after migration HOT 1
- PipeableOperatorsOnlyRule.js fails silently when RXJS 6 is installed HOT 7
- rxjs-5-to-6-migrate doesn't seem to handle operator chaining. HOT 3
- How to use the rules in Webstorm HOT 1
- Unable to install other modules after installing this HOT 11
- > I passed this error. It required typescript to be installed globally. HOT 1
- rxjs-pipeable-operators-only rule not producing any output
- rxjs-5-to-6-migrate doesn't seem to handle takeUntil piping
- Out of memory HOT 6
- Migrating TsLint to EsLint HOT 6
- Bug report - optimist, minimist dependency security vulnerability high
- Add support for tslint 6.x HOT 4
- subscribe is deprecated: Use an observer instead of a complete callback (deprecation) HOT 1
- Yarn install failing suddenly on V 4.17.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxjs-tslint.