I have integrated this library into my code
Library Link
I have added typings for it in my project as follows
I have included it in my .ts file like this
import accounting from "accounting";
I can locate the typings under /node_modules/@types/accounting
However, when I attempt to run the project, my webpack displays the following error
./app/javascript/components/helpers.ts
Module not found: Error: Can't resolve 'accounting' in '/Users/nemesises/Documents/GitHub/falco-web/app/javascript/components'
@ ./app/javascript/components/helpers.ts 1:0-36
@ ./app/javascript/components/itinerary/scripts/hotel_results.ts
@ ./app/javascript/components/step1/step1.ts
@ ./app/javascript/components/step1/index.js
@ ./app/javascript/packs/step1.js
@ multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/step1.js
Here is the content of my tsconfig.json file
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"typeRoots": [
"./node_modules/@types"
],
"types": [ "jquery", "accounting" ],
"lib": ["es6", "dom"],
"allowSyntheticDefaultImports": true,
"module": "es6",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"exclude": [
"**/*.spec.ts",
"node_modules",
"vendor",
"public"
],
"compileOnSave": false
}
How can I resolve this issue?