Version 1.1.0 breaks typescript imports
See original GitHub issueHey there,
my gulpfile is written in Typescript and gulp-replace
is used like this:
import replace from "gulp-replace";
function doSomething() {
return gulp.src("directory/*.html")
.pipe(replace("string", "anotherString"))
.pipe(gulp.dest("anotherDirectory"));
}
exports.build = gulp.series(doSomething);
After upgrading to ~1.1.0
, this breaks with
gulpfile.ts:46:35 - error TS2349: This expression is not callable.
Type 'typeof import("<somePath>/node_modules/gulp-replace/index")' has no call signatures.
I also tried
import { replace } from "gulp-replace";
import * as replace from "gulp-replace";
but without success 😕
Any help appreciated!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Typescript imports not working · Issue #5082 · axios ... - GitHub
I am importing axios as follows into my typescript project: import axios from 'axios'; which compiles ... 1.1.0 is the last working version....
Read more >Documentation - TypeScript 3.8
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there's no remnant of...
Read more >Documentation - TypeScript 4.5
TypeScript 4.5 supports an ECMAScript proposal for import assertions. This is a syntax used by runtimes to make sure that an import has...
Read more >Documentation - TypeScript 4.9
TypeScript 4.9 adds the other half, and now provides “Remove Unused Imports”. TypeScript will now remove unused import names and statements, but will...
Read more >Documentation - TypeScript 4.7
Node.js allows ES modules to import CommonJS modules as if they were ES modules with a default export. ts. // ./ ...
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 FreeTop 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
Top GitHub Comments
@schw4rzlicht no problem, can you review/test that PR and see if it fixes the issue? Clone the repository locally, check out that branch, run
npm link
inside of it, then in your projectnpm link gulp-replace
. When done testing, runnpm unlink gulp-replace
in your project.Oh, I only searched for issues related to my problem. The PR you mentioned deals with exactly the problem I am facing.