Steps to Reproduce:
1.cannot find any npm scripts in any project, even a simple create-react-app project.
2.it still not work when I click the refresh button in "NPM SCRIPTS" bar.
3.the screen-shot is a simple create-react-app project.

Does this issue occur when all extensions are disabled?: Yes
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
Same thing happened to me a couple of weeks ago since a popup showed up warning about bad performance of this built-in extension. Any progress on this issue? I tried reinstalling with no success.
couple
You remind me, I also came up with something like a popup warning dialog before this bug appears.
+1
Had the same problem. This fixed it for me:
Settings -> Features ->Task -> Auto Detect - "on"
Had the same problem. This fixed it for me:
Settings -> Features ->Task -> Auto Detect - "on"
thank you, it works for me.
I cannot reproduce this using a create-react-app project

I also came up with something like a popup warning dialog before this bug appears.
Can you share this popup dialog. I suspect it is the warning that a task detection took too long and timed out?
Can you share more information about your workspace by running code --status when code is running and include the the 'Workspace Stats' section. For example, this is what I'm getting from the create-react-app:
Workspace Stats:
| Window (package.json — my-app)
| Folder (my-app): 15 files
| File types: js(3) css(2) gitignore(1) json(1) md(1) lock(1) svg(1)
| html(1) ico(1)
| Conf files: package.json(1)
Update after discussing with @alexr00 I now understand what is going on.
This setting is global and therefore no more task detection takes place.
To recover from the setting change from above does this:
Settings -> Features ->Task -> Auto Detect - "on"
We will improve this behaviour.
Since the setting is behaving as expected, I'm going to close this issue. Improving the case where we currently show the notification with the dangerous 'Disable All' button is tracked by https://github.com/microsoft/vscode/issues/90015.
Most helpful comment
Had the same problem. This fixed it for me:
Settings -> Features ->Task -> Auto Detect - "on"