question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PhpStorm: Unresolved method or function setOutputPath()

See original GitHub issue

Thanks for making Encore.

I’ve done the following:

  1. Installed Encore as documented.
  2. Enabled the Node.js core library in PhpStorm.
  3. Restarted PhpStorm just to be sure.

In webpack.config.js, PhpStorm is showing the warning “Unresolved method or function setOutputPath()”: screen shot 2017-09-03 at 12 39 52

I’ve verified that setOutputPath() exists in node_modules/@symfony/webpack-encore/index.js.

How can I tell PhpStorm where to find the Encore functions?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
weaverryancommented, Feb 11, 2018

Do it! I’m sure those steps are still valid - so this is just a chore we need to get done 😃

1reaction
Lyrkancommented, Nov 7, 2017

Doing something like that seems to actually work:

class Encore {
    /**
     * @returns {Encore}
     */
    method1() {
        // (...)
        return this;
    }

    /**
     * @param {string} test
     * @returns {Encore}
     */
    method2(test) {
        // (...)
        return this;
    }

    /**
     * @param {string} test
     * @returns {void}
     */
    method3(test) {
        // (...)
    }
}

/**
 * @type {Encore}
 */
module.exports = new Proxy(
    new API(),
    { /* ... */ }
);

So we’d need to:

  • switch the current const to a class (I tried to keep the const but for some reason that implied adding a @property tag for each method of the API)
  • replace all @return {exports}/@returns {exports} by @returns {Encore}
  • add the @type tag to the module.exports and instantiate the class
Read more comments on GitHub >

github_iconTop Results From Across the Web

phpstorm unresolved function or method $() - Stack Overflow
I have the following problem: phpstorm do not recognize jquery methods and here and there I see. enter image description here. Unresolved function...
Read more >
"Unresolved function or method"
I have a node.js project that includes the node-imap module. That module uses code like this to inherit from events.EventEmitter:
Read more >
src/test/java/com/android/tools/r8/R8RunArtTestsTest.java - r8 - Git ...
Test intentionally asserts absence of default interface method in a class. .put("048-reflect-v8", AndroidApiLevel.N.getLevel()).
Read more >
Index (Windup 6.1.0.Final Javadoc API) - GitHub Pages
An abstract operation providing some default methods useful for the DecompilerOperations. AbstractDecompilerOperation() - Constructor for class org.jboss.windup ...
Read more >
availables.xml
1.10 - Fix warning filter for testSomething() methods that are in test. ... phpStorm.phpattention Method calls and some common php functions may return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found