New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeclared dependency shows problem/warning for extraneous module #21666
Comments
@tyrsius Do you have any extensions that generate these problems? |
I have this issue, too. Message
was generated by the extension 'npm'. |
These problems are generated from the extension |
@tyrsius Ca you please provide the screenshot of the problems you are seeing in the problems panel? |
@tyrsius @ttraenkler @banyudu this warning is correct and indicates that you have a module in your node_modules folder that isn't listed in the package.json. This can happen when it was installed without the Why is this bad? When the folder is shared through an SCM system and the node_modules are not checked in, then your team mate cannot just run The fix is to add these modules as @tyrsius the warning will no appear when you follow your steps and do an npm install in a fresh folder. |
@egamma If I follow the steps I posted in my initial post, in a new folder with a fresh npm install, I get this warning. I am sorry, but this warning is not correct. |
@egamma I am using "yarn add" to add dependencies, not "npm install", which "adds" the --save parameter implicitly. |
@egamma Yes, it works with npm. But if someone use yarn or cnpm instead of npm, things are different.
These directories(or symbolic links) will trigger the extraneous warn. |
I followed the steps and didn't get the warning. Not clear what the difference between yours and my setup is. This warning actually comes from |
This issue was moved to microsoft/vscode-npm-scripts#34 |
Steps to Reproduce:
package.json
filenpm install
dependencies
These packages are not dependencies of the package, and this error should not show.
The text was updated successfully, but these errors were encountered: