3

PC:Windows 10 V1607.
PhpStorm 2016.3.2
Build #PS-163.10504.2, built on December 20, 2016
JRE: 1.8.0_112-b15 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation

  1. I have already mark "node_modules" as Resource Root in setting.
  2. I have cleaned the IDE (PhpStorm) cache and reindex files.

resources/assets/sass/app.scss which was built with Laravel still get the inspection "can not resolve the directory "node_modules"".

// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; // can't resolve the directory by IDE.
2
  • I'd love to know the answer to this as I've faced the same issue for quite some time. Commented Jan 12, 2017 at 7:22
  • According to the accepted answer on this question, the Resource Root should be set to the root of your application, not the node_modules directory. Does changing the resource root to be the root of your application fix the issue? Commented Jan 12, 2017 at 7:31

1 Answer 1

6

Mark project root as Resources Root in File->Settings->Direcotries. If you want to locate the uri in your blade, mark your project/public as Resources Root too. Hope it could help.

Thanks @patricus

I have received Phpstorm team's same answer about that, and strong recommend to use Jetbrains' JDK instead of Oracle's.

So it is necessary to switch to Jetbrains' JDK build instead of Oracle by following these steps:

1.Go to File | Settings | Plugins > Install JetBrains Plugin
2.Find and install JB SDK Bintray Downloader plugin
3.After the restart, press Ctrl+Shift+A or Help > Find Action
4.Type in "Get JB SDK from BinTray" and press Enter
5.From the list select the latest JDK build - at this moment it is jbsdk8u112b676_windows_x64.tar.gz (2017-01-13)
6.Press download, then press Install after it will finish
7.After a restart check that JVM vendor and JRE version are updated in Help > About screen

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.