chore: A round of "yarn fix" for everyone (#75)
This commit is contained in:
parent
08b34f4f76
commit
7c9d61d9e6
1 changed files with 58 additions and 42 deletions
|
|
@ -13,20 +13,23 @@ const loadServer = async () => {
|
|||
try {
|
||||
// Save original argv
|
||||
const originalArgv = process.argv;
|
||||
|
||||
|
||||
// The filesystem server expects directories as command line arguments
|
||||
process.argv = [process.argv[0], process.argv[1], ...args];
|
||||
|
||||
|
||||
// Dynamically import the ESM module
|
||||
await import('@modelcontextprotocol/server-filesystem/dist/index.js');
|
||||
|
||||
await import("@modelcontextprotocol/server-filesystem/dist/index.js");
|
||||
|
||||
// Restore original argv
|
||||
process.argv = originalArgv;
|
||||
} catch (error) {
|
||||
console.error('Failed to load @modelcontextprotocol/server-filesystem:', error);
|
||||
console.error(
|
||||
"Failed to load @modelcontextprotocol/server-filesystem:",
|
||||
error,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
// Execute the async function
|
||||
loadServer();
|
||||
loadServer();
|
||||
|
|
|
|||
Loading…
Reference in a new issue