-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Describe the bug
When running npm start
, the following error occurs: ReferenceError: Cannot access 'IDBManager' before initialization
, which prevents the project from starting.
To Reproduce
Steps to reproduce the behavior:
- Run
npm start
in the project root directory - The terminal displays an error message
- The server fails to start
Expected behavior
The server should start successfully without any ReferenceError
.
Screenshots
Error message:
file:///Users/wingch/mcp/mcp-server-simulator-ios-idb/dist/index.js:44
const idbManager = new IDBManager();
^
ReferenceError: Cannot access 'IDBManager' before initialization
at createMCPServer (file:///Users/wingch/mcp/mcp-server-simulator-ios-idb/dist/index.js:44:24)
at new MCPSimulatorServer (file:///Users/wingch/mcp/mcp-server-simulator-ios-idb/dist/mcp/mcp-server.js:36:34)
at file:///Users/wingch/mcp/mcp-server-simulator-ios-idb/dist/mcp/mcp-server.js:133:16
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:34:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.10.0
Desktop (please complete the following information):
- OS: macOS (15.4.1 (24E263))
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
It seems that IDBManager
is being used before it is initialized or defined. Please check the import/require statements and the order of class definitions.
Node.js version: v20.10.0
Metadata
Metadata
Assignees
Labels
No labels