App threw error during load: cannot find module

I am building an electron app with typescript/javascript. I am trying to use a node package: nativescript-audio, which can be found here:

When attempting to import from that module, I get an error on runtime:

App threw an error during load
Error: Cannot find module ‘nativescript-audio’
Require stack:

  • /Users//electron-quick-start-typescript/dist/main.js
  • /Users//electron-quick-start-typescript/node_modules/electron/dist/
  • at Module._resolveFilename (internal/modules/cjs/loader.js:659:15)
    at Function.Module._resolveFilename (/Users//electron-quick-start-typescript/node_modules/electron/dist/
    at Function.Module._load (internal/modules/cjs/loader.js:577:27)
    at Module.require (internal/modules/cjs/loader.js:715:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object. (/Users//electron-quick-start-typescript/dist/main.js:5:30)
    at Module._compile (internal/modules/cjs/loader.js:815:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:677:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:609:12)

I am running this in the electron quick start typescript project.

here is my tsconfig.json file:

“compilerOptions”: {
“module”: “commonjs”,
“target”: “es2015”,
“noImplicitAny”: false,
“sourceMap”: true,
“outDir”: “dist”,
“baseUrl”: “.”,
“moduleResolution”: “node”,
“paths”: {
": ["node_modules/”]
“include”: [

and here is the package.json file:

“name”: “electron-quick-start-typescript”,
“version”: “1.0.0”,
“description”: “A minimal Electron application written with Typescript”,
“scripts”: {
“build”: “tsc”,
“watch”: “tsc -w”,
“lint”: “tslint -c tslint.json -p tsconfig.json”,
“start”: “npm run build && electron ./dist/main.js”
“repository”: “”,
“keywords”: [
“author”: “GitHub”,
“license”: “CC0-1.0”,
“devDependencies”: {
“electron”: “^5.0.6”,
“electron-rebuild”: “^1.8.5”,
“tslint”: “^5.18.0”,
“typescript”: “^2.9.2”
“dependencies”: {
“nativescript-audio”: “^5.0.2”,
“tns-core-modules”: “^5.4.3”