TypeScript says module not found for @polymarket/clob-client even though it is installed and in node modules
I have installed @polymarket/clob-client and it is in my node_modules but typescript still says the module is not found when i try to use it
This is index.ts
`
import {ethers} from "ethers";
import {ApiKeyCreds, ClobClient, OrderType, Side} from "@polymarket/clob-client";
console.log("Hello world")
`
package.json
`
{
"name": "polymarket",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "ts-node src/index.ts",
"start": "node dist/index.js"
},
"keywords": [],
"author": "Kharay 33455",
"license": "ISC",
"dependencies": {
"@polymarket/clob-client": "^5.1.0",
"@types/node": "^25.0.0",
"ethers": "^6.16.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
}
}
`
tsconfig.json
`
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true
}
}
`
I have tried uninstalling and reinstalling
Creating a types folder and exporting.
globally installing
Still can't find it. Any advise in the right direction would really help