-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:OS: Linux/Ubuntu
node.js / npm versions: 20.9.0 / 10.1.0
Additional info:
-
Not Needed
Problem Statement/Rationale
When I run the basic playground template, I get `ReferenceError: use is not defined`
Steps to Reproduce
1. I connect to my db, hover over the magnifying glass next to Documents, select "Search for documents"
2. I get this beginning of playground code:
/* global use, db */
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
// The current database to use.
use('tags');
Expected Results
Code runs with no error.
Actual Results
[Running] node "/projects/dog_tracking_v2/app/tempCodeRunnerFile.js"
/data/info/projects/dog_tracking_v2/app/tempCodeRunnerFile.js:6
use('tags');
^
ReferenceError: use is not defined
at Object.<anonymous> (/data/info/projects/dog_tracking_v2/app/tempCodeRunnerFile.js:6:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Node.js v20.9.0
[Done] exited with code=1 in 0.074 seconds
Additional Notes
Any additional information that may be useful to include.
- is related to
-
VSCODE-479 Add "Run MongoDB playgroud code"
- Open