To build the dist/bundle.js, using the package.json info, you would just do the following two steps:
npm run build
npm install
npm run build
This is typical of how many web tools are packaged today. Even though we use the node package manager, the output is for running in a web browser (not node). But the node ecosystem is used for packages and for tools to "bundle" the code into a form usable in a browser.