From the error messages you’re dealing with, it’s clear you are facing a couple of issues when trying to run a script using PowerShell and npm. Here’s a breakdown of the errors and some suggestions on how you might resolve them:

1. PowerShell Syntax Error:
- The syntax error in PowerShell is likely caused by trying to execute something not valid within PowerShell directly. You are trying to define a script directly in PowerShell using "check:dependencies": "ts-node ...", which is not correct PowerShell syntax.
- If you are trying to define or modify something in package.json, you should do this directly in your package.json file, not in PowerShell.

2. Node.js MODULE_NOT_FOUND Error:
- This error indicates that the Node.js script ./scripts/check-dependencies.ts cannot be found.
- Ensure that the file check-dependencies.ts actually exists at the location C:\Users\israe\Documents\GitHub\webapp\scripts\.
- Verify the exact path and filename are correctly spelled and there are no typographical errors.

3. Incorrect npm script Command:
- If your intention is to run a script defined in package.json, you should ensure that it’s properly defined in the "scripts" section of package.json like so:

     “scripts”: {
       “check:dependencies”: “ts-node -r tsconfig-paths/register -P ./tsconfig.json ./scripts/check-dependencies.ts”
     }

   - You then correctly use npm run check:dependencies in PowerShell.

4. PSReadLine Exception:
   - This error can occur when there’s console rendering issues in PowerShell. You can often resolve this by clearing the console with cls or clear, or adjusting the window size.
   - Ensure that you’re not pasting large blocks of text that might exceed the buffer or capacity of the console display.

By following these steps, you should be able to address the issues you’re encountering. Make sure that your script paths are correct and that you’re using the appropriate tool for the task you aim to accomplish.
{
“name”: “@marblism/monorepo”,
“version”: “4.0.0”,
“description”: “”,
“main”: “index.js”,
“type”: “module”,
“scripts”: {
“clean”: “npx rimraf node_modules && npx rimraf dist”,
“init”: “pnpm install && pnpm run --filter server init ; pnpm run --filter web init”,
“dev”: “pnpm run --parallel dev”,
“build”: “pnpm run --filter server build”,
“start”: “pnpm run --parallel start”,
“ensure”: “pnpm -v || npm install -g pnpm@9.9.0 && pnpm install”,
“format”: “prettier --write “**/*.{ts,tsx}””,
“lint”: “eslint .”,
“web:build”: “next build”,
“test”: “jest”,
“prepublishOnly”: “npm run build && npm test”,
“check:dependencies”: “ts-node -r tsconfig-paths/register -P ./tsconfig.json ./scripts/check-dependencies.ts”
},
“keywords”: [],
“author”: “”,
“license”: “ISC”,
“dependencies”: {
“@deck.gl/geo-layers”: “^9.0.29”,
“@eslint/eslintrc”: “^3.1.0”,
“@nestjs/axios”: “^3.0.3”,
“axios”: “^1.7.7”,
“pnpm”: “^9.10.0”
},
“devDependencies”: {
“@eslint/js”: “^9.9.1”,
“@typescript-eslint/eslint-plugin”: “^8.5.0”,
“@typescript-eslint/parser”: “^8.5.0”,
“eslint”: “^9.10.0”,
“eslint-plugin-react”: “^7.35.2”,
“globals”: “^15.9.0”,
“prettier”: “^3.3.3”,
“rimraf”: “^6.0.1”,
“typescript”: “^5.5.4”,
“typescript-eslint”: “^8.5.0”
},
“engines”: {
“node”: “>=20.11.0”,
“npm”: “>=10.2.4”,
“vscode”: “^1.22.0”,
“pnpm”: “>=9.9.0 <10”
}
}
Based on the package.json you’ve provided, it seems you’re using a monorepo structure with a focus on Node.js, TypeScript, and potentially a React front-end (given the presence of next build in your scripts).

The scripts section looks well-organized for various development tasks like cleaning up, building, formatting, and running tests. However, you mentioned earlier issues with running a custom script called check:dependencies. Here are a few things you should verify in your setup:

### Validation and Suggestions

1. Path Verification for check:dependencies.ts:
- Ensure the file check-dependencies.ts exists at the specified path: ./scripts/check-dependencies.ts.
- If the path or file name is incorrect, update it accordingly.

2. Correct Execution Context:
- Since you’re using ts-node, ensure that it’s installed properly. Given your use of pnpm, ensure that the necessary Node packages are installed using pnpm install.

3. tsconfig.json Configuration:
- Ensure that your tsconfig.json in the root or scripts directory is set up correctly to resolve paths as expected for ts-node.

4. Dependencies Check:
- Ensure all necessary dependencies for ts-node and tsconfig-paths are installed. If ts-node is not globally or locally available, consider adding it to your devDependencies:

     “devDependencies”: {
       // existing devDependencies
       “ts-node”: “^latest”,
       “tsconfig-paths”: “^latest”
     }


5. TypeScript Setup:
   - Ensure that your TypeScript files are compatible with the version of TypeScript you’re using as listed in your devDependencies.

6. Update Package Manager Versions:
   - You’re specifying a range for pnpm. Make sure your installed version of pnpm aligns with the specified version range.

### General Tips

- Running Scripts: Use pnpm run [script-name] if you prefer pnpm for better management and execution within your workspace.
- Error Handling: Wrap your custom scripts in try-catch to generate more user-friendly error outputs.
- Documentation: Document all custom scripts in your scripts section to make it easier for collaborators to understand their purposes.

### Execution

Once everything is set up correctly, you should be able to run the check:dependencies script with:

npm run check:dependencies

or 

pnpm run check:dependencies


If issues persist after verifying the above points, check for any additional logging or configurations needed in ./scripts/check-dependencies.ts.{