After following the instructions from this helpful link to install an npm package through a file path,
I encountered an error when attempting to use it:
Cannot find module '<module_name>' or its corresponding type declaration
Are there any tutorials available that outline the process for installing a typescript-based npm package locally?
Below is the package.json content of the package I am trying to install:
{
"name": "sqs",
"version": "1.0.0",
"description": "",
"main": "src/index.ts",
"types": "dist/index.d.ts",
"scripts": {
"build": "rm -rf build && prettier --write src/ && tsc",
"start": "ts-node ./src/index.ts",
"start:prod": "npm run build && node ./dist/src/index.js",
"start:dev": "./node_modules/nodemon/bin/nodemon.js",
"lint": "eslint '**/*.{js,ts,tsx}'",
"lint:fix": "eslint --fix '**/*.{js,ts,tsx}'",
"prettier": "prettier -c ./src/**/*.{js,ts,tsx,scss,css,md}",
"prettier:fix": "prettier -c ./src/**/*.{js,ts,tsx,scss,css,md} --write"
},
"author": "Rohit Sthapit",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.820.0",
"nodemon": "^2.0.20",
"readline-sync": "^1.4.10",
"ts-node": "^10.9.1"
},
"devDependencies": {
"@types/dotenv": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"dotenv": "^8.2.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1"
}
}