Yarn Plug'n'Play — WebStorm cannot resolve dependencies and doesn't provide coding assistance
I've installed the new Yarn v2 which now uses Plug'n'Play by default. I've tried to create a new empty folder, running yarn init and yarn add node-fetch (for example) then, with node.js assistance enabled:
const fetch = require('node-fetch');
WebStorm says that I should install node-fetch. But it's already installed, and PnP support was announced in WebStorm 2019 (I've tried using both 2019 and 2020 EAP).

How can I tell WebStorm to get those dependencies from .pnp.js? It's kinda annoying to code with those warnings popping up.
Details:
WebStorm 2020.1 EAP
Build #WS-201.3803.72, built on January 24, 2020
WebStorm EAP User
Expiration date: February 23, 2020
Runtime version: 11.0.5+9-b674.2 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.2
GC: ParNew, ConcurrentMarkSweep
Memory: 990M
Cores: 4
Registry:
Non-Bundled Plugins:
macOS version 10.15.2, Yarn version 2.0.0-rc.27
请先登录再写评论。
What yarn version do you use? Yarn >= 2.0.0-rc23 is not yet supported, the fix (https://youtrack.jetbrains.com/issue/WEB-43298) will be available in next 2020.1 EAP
Sorry, I was using Yarn 2.0.0-rc.27 and I thought that issue is related to something else :) Thanks for the information!
I have same issue with Yarn 2.0.0-rc.29 and WS 19.3.3
Use WebStorm EAP (2020), you can download it from JetBrains Toolbox via drop-down near product install button. New versions have this issue solved.
Some of the packages started to work. But I still can't navigate to packages in same monorepo. Even in JS, where it used to work )
In the attached screenshot I am viewing package.json from storybook package, web-modules-test package is located in the same monorepo. Yet WS 2020.1 says it's not installed.
could you share a sample project the issue can be reproduced with?
I cannot, the repo is private... also as you see some other packages are resolved just fine, even though they have exactly the same structure.
This is from yarn.lock. As you see there is no difference between packages, yet, statements package is visible in WS and test & validator are marked as not installed.
Sorry, but this information gives me no clue
https://github.com/kirill-konshin/web-modules-bug here you go.
Run yarn install && yarn build
You'll see that everything is successfully built, yet if you open statements/src/index.ts it won't navigate to test package. And if you view any of package.jsons you'll see that workspace packages are "not installed" — have yellow background:
>You'll see that everything is successfully built
yarn build fails for me:
E:\downloads\web-modules-bug>yarn install ➤ YN0000: ┌ Resolution step ➤ YN0000: └ Completed in 0.01s ➤ YN0000: ┌ Fetch step ➤ YN0013: │ typescript@patch:typescript@npm%3A3.8.3#builtin<compat/typescript>::version=3.8.3&hash=273569 can't be found in the cache and will be fetched from the disk ➤ YN0013: │ typescript@npm:3.8.3 can't be found in the cache and will be fetched from the remote registry ➤ YN0000: └ Completed in 23.84s ➤ YN0000: ┌ Link step ➤ YN0000: └ Completed in 0.05s ➤ YN0000: Done in 23.9s
E:\downloads\web-modules-bug>yarn build ➤ YN0000: src/index.ts(1,23): error TS2307: Cannot find module 'web-modules-test'. ➤ YN0000: The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph ➤ YN0000: Failed with errors in 0.98s
Run install one more time ))) somehow it helps
thanks, reproduced. Please follow https://youtrack.jetbrains.com/issue/WEB-44355 for updates