Closed Erikvv closed 6 years ago
If I modify this line it works: https://github.com/TypeStrong/grunt-ts/blob/master/tasks/ts.ts#L52
replace
grunt.log.verbose.writeln
with
(..args) => grunt.log.verbose.writeln(...args)
Not sure if this issue should be fixed in grunt-ts or in grunt itself.
What version of grunt are you using? Can you share more of your gruntfile and any switches you're using on grunt?
Not sure why this
would be a concern here. I haven't heard other reports of this being a problem.
@Erikvv any chance you can provide the version of grunt/node you're using or did this cease being a problem?
I didn't solve the problem so I now run tsc as an npm task via grunt-exec.
I was using grunt 1.0.1 and node 9 which were the latest versions at the time.
Oh yeah it may be of note that the project uses a wrapper for grunt to split up the config file. But it works fine for a dozen other popular grunt tasks like webpack, linters and test frameworks.
Sorry for being semi-usefull, we don't use Grunt any more for newer projects and it's not worth it for me to spend time on this issue. Just wanted to share my experience so it may be of help.
Totally understood - thanks so much for the report and sorry it took so long to reply. I am in a similar place with Grunt and it seems you had a special use-case. I'm maintaining grunt-ts mainly because of the long tail of users and I can't imagine we get many new users these days. Going to close this out, I think. Thank you!
version: 6.0.0-beta.17
Log.prototype.writeln works in general but it seems like the "this" context is wrong in this case.