how to import from a npm module code example Example: how to import npm module import foo from 'bar'; //or const bar = require('foo');