6

This is a tooling question, so I'm not sure if it's appropriate for stack overflow. I'm using gulp in WebStorm 10 to concatenate my .js files into a dist folder. In my gulpfile.js, WebStorm is warning me that gulp.src(...).pipe() can not be resolved.

enter image description here

I've added the gulp-util typescript community map file to the libraries list in settings, which is the only place a function called pipe() exists that I can find in node_modules.

enter image description here

I've also confirmed that the gulp-util library is being used to try to resolve references in gulpfile.js. It's the only warning I have left in my app and I'd sure love to get it resolved.

Patrick Kostjens
  • 5,065
  • 6
  • 29
  • 46
sonicblis
  • 2,926
  • 7
  • 30
  • 48

4 Answers4

5

I posted a similar question on the Webstorm site and got the following answer:

to resolve pipe open ’Settings | 'languages & Frameworks | JavaScript | Libraries’ and choose ’Node.js Core Modules’

https://disqus.com/home/discussion/jetbrains/using_gulp_task_runner/?utm_source=reply&utm_medium=email&utm_content=read_more#comment-2240193852

jbhelfrich
  • 410
  • 1
  • 3
  • 9
  • I had a similar issue. .task, .src and .dest were "not defined" but .pipe was fine. I already had Core Modules selected but turning it off and on again fixed it. Classic IT. – Chro Oct 18 '16 at 12:46
  • I have this problem on PHPStorm and don't have 'Node.js Core Modules', what should I do? Gulp was working fine an hour ago, I just added a package and now I got warning everywhere.... reinstalled npm modules also, don't get what's happening – DevMoutarde Jan 11 '18 at 15:16
1

In the end of 2019 faced the same issue but in PHPStorm.

  • i got the "Unresolved function or method pipe()" and
  • the "Unresolved function or method require()" error messages in PHPStorm.

Downloading the @types/gulp library in PHPStorm resolved both issues. enter image description here

cofirazak
  • 562
  • 6
  • 16
0

I had same problem and enabling Node.js Core didn't help.

For me solution was to delete whole .idea directory and import project from scratch. Be careful this will remove all your project settings.

Banciur
  • 75
  • 6
0

This option helped me. All I did, was install node.d.ts from DefinitelyTyped on GitHub.

The answer is from a similar question: https://stackoverflow.com/a/39415394/4637577

Web Master
  • 327
  • 1
  • 3
  • 13