Issue Type: Bug
Previous to this version, NPM Script Explorer would show for the following scenario:
Solution
- Project1
- package.json (with scripts)
- Project2
- package.json (with scripts)
- Project3
- no package.json
To test if this was an extension causing this issue, I installed the latest insider:
(Version: 1.48.0-insider (user setup)
Commit: db40434f562994116e5b21c24015a2e40b2504e6
Date: 2020-08-11T23:21:50.282Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041)
I made sure that no extensions were installed and that NPM Script Explorer was turned on. When I opened up the solution, the NPM Script Explorer did not show up.
If I open up by project, the NPM Script Explorer appears as expected.
I checked the Dev Tools and there were no errors in the console.
VS Code version: Code 1.48.0 (db40434f562994116e5b21c24015a2e40b2504e6, 2020-08-13T07:50:42.600Z)
OS version: Windows_NT x64 10.0.19041
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|31.83GB (16.61GB free)|
|Process Argv|--folder-uri file:///c%3A/dev/Repos/site-dental-ecom|
|Screen Reader|no|
|VM|0%|
Same problem: it will find all needed package.json files if there is one in the root of workspace, but view won't be shown if there is no root package.json even if checkbox for "npm.enableScriptExplorer": true suggests that it will search for non-top files.
Looks like enableScriptExplorer is not referenced in sources.
By default, the NPM script explorer is now hidden when you open a project that you haven't opened before. We decided to do this because the Explorer viewlet can have _a lot_ of views in it, and it's important to us that we keep it form being cluttered. Since not everyone uses the NPM script explorer, it seemed like a logical choice to hide by default.
You can unhide it by using the Views menu in the explorer:

The old setting is confusing however, and should be deprecated with a useful message.
@alexr00 This was first thing I've tried, but I don't see NPM Scripts at all (even as hidden) if there in no package.json in the root of the workspace. I think original report also refers to this problem.
On the screenshot you can see opened package.json in *-ui-web folder, bit view is not available there.

But if I add empty package.json to the root of workspace (one level above *-ui-web) I can see all scripts form package.json files in *-ui-web and nested folders.
Just tried 1.46.1 - it has NPM Scripts view even without package.json in the root of workspace folder which is what I expect.
I see the problem, thanks for elaborating further!
To verify:
To verify:
- Start VS Code with a fresh user data dir
- Open a folder that doesn't have a package.json at the top level.
- Verify that if you open the Explorer "..." views menu you see NPM scripts and can show it.
Do you know which vscode build is this patch supposed to be in?
It is available in 1.48.1
Most helpful comment
@alexr00 This was first thing I've tried, but I don't see NPM Scripts at all (even as hidden) if there in no

package.jsonin the root of the workspace. I think original report also refers to this problem.On the screenshot you can see opened
package.jsonin*-ui-webfolder, bit view is not available there.But if I add empty
package.jsonto the root of workspace (one level above*-ui-web) I can see all scripts formpackage.jsonfiles in*-ui-weband nested folders.Just tried 1.46.1 - it has NPM Scripts view even without
package.jsonin the root of workspace folder which is what I expect.