Npm issues for installing packages

It seems that the package management of npm, and sometimes yarn in the new version of next, have a problem, and the packages cannot be installed except in the legacy mode… please guide me in this matter.

Deployment URL or Custom Domain:
Environment (local, preview, production):
Project Framework:
Build Settings:
  Framework Preset:
  Build Command (if not default):
  Output Directory (if not default):
  Install Command (if not default):
Node/Runtime Version:
Package Manager:
Relevant Packages:

Hey,

Can you send us the error you are receiving? Using legacy mode is likely mean your packages are outdated and may not compatible with recent version of Node.js