You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then when you run gulp-depcheck you get an error: "Unable to parse some files: cat.ts"
These new TypeScript operators are like the holy grail and so this is very critical to get fixed.
UPDATE:
After doing some digging I discovered that this behavior is caused by the fact that gulp-depcheck has locked in an old version of depcheck itself. So in gulp-depcheck's package.json file it specifies: "depcheck": "0.6.7" But if it was updated to specify the latest version: 0.9.1, then this error doesn't come up.
WORK AROUND:
So after discovering that the issue is with an outdated version of depcheck, I noticed we can override the version of depcheck that gulp-depcheck is using.
We can do that by specifying the depcheck option when activating gulp-depcheck. See here:
var gulpDepcheck = require('gulp-depcheck');
...
gulp.task('depcheck', gulpDepcheck({
// Override depcheck version inside gulp-depcheck.
depcheck: require('depcheck'),
// your other gulp-depcheck options go here still
}));
Make sure you install the version of depcheck that you want in the package that you are using gulp-depcheck: npm i depcheck --save-dev
The text was updated successfully, but these errors were encountered:
There are a few new operators in TypeScript and one of them (maybe the other ones too) is causing the error "Unable to parse some files: ".
The operator I'm referring to is the optional chaining operator: ?.
If you have a file named 'cat.ts' and have somewhere the following code:
then when you run gulp-depcheck you get an error: "Unable to parse some files: cat.ts"
These new TypeScript operators are like the holy grail and so this is very critical to get fixed.
UPDATE:
After doing some digging I discovered that this behavior is caused by the fact that gulp-depcheck has locked in an old version of depcheck itself. So in gulp-depcheck's package.json file it specifies:
"depcheck": "0.6.7"
But if it was updated to specify the latest version: 0.9.1, then this error doesn't come up.WORK AROUND:
So after discovering that the issue is with an outdated version of depcheck, I noticed we can override the version of depcheck that gulp-depcheck is using.
We can do that by specifying the
depcheck
option when activatinggulp-depcheck
. See here:Make sure you install the version of depcheck that you want in the package that you are using gulp-depcheck:
npm i depcheck --save-dev
The text was updated successfully, but these errors were encountered: