pnpm

How to fix vscode warning module not installed when using pnpm


mkdir a-1 && cd a-1
pnpm init
pnpm i eslint --save-dev
code .

I opened this project in vscode on windows 10 and vscode showed these warnings.

Module '.pnpm' is extraneous
Module '@eslint/eslintrc' is extraneous
Module 'eslint-scope' is extraneous
Module 'eslint-utils' is extraneous
Module 'eslint' is not installed

warning

I know this doesn't affect the project, but is there any way to go about hiding this warning.


Solution

  • Open the settings menu (Ctrl+, - Windows / Cmd+, - Mac), and navigate to the Npm: Package Manager field. Change the value in the dropdown to pnpm.

    Afterwards, open the command palette (Ctrl+Shift+P, - Windows / Cmd+Shift+P, - Mac) and choose Developer: Reload Window.