I'm encountering an issue with the xlsx package in my UI5 project (using TypeScript) as it is unable to find the module. Can someone please help me with resolving this problem?
Here is how I am importing it in my main.controller.ts file:
import { XLSX } from "xlsx";
The error message I am getting is:
Cannot find module 'xlsx'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?ts(2792)
This is the content of my package.json file:
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-typescript": "^7.16.0",
"@sap/ui5-builder-webide-extension": "^1.1.7",
"@sap/ux-ui5-tooling": "1",
"@sapui5/ts-types-esm": "1.99.2",
"@types/jquery": "3.5.1",
"@types/xlsx": "^0.0.36",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@ui5/cli": "^2.14.1",
"babel-preset-transform-ui5": "^7.0.5",
"eslint": "^8.4.1",
"npm-run-all": "^4.1.5",
"typescript": "^4.5.3",
"ui5-middleware-livereload": "^0.5.8",
"ui5-task-zipper": "^0.4.2",
"xlsx": "^0.18.5"
}