'Could not resolve' an installed node module - how to debug?

I’ve installed a couple of node modules in a Phoenix project by cd-ing into the assets directory and running npm install module_name --save.

I’m then importing classes from the modules in app.js:

import { ClassOne } from 'module-one'
import { ClassTwo } from 'module-two'

The class imported from the first module worked fine, and I could use it elsewhere in app.js. However, I got the following error when I added the second module:

✘ [ERROR] Could not resolve "module-two"

To me, the setup of both modules looks identical. I suppose it could be an issue with the second module, which is little-used. I will admit to being relatively useless with all things JavaScript-related. How would I debug and potentially resolve this issue?