$ sudo npm i iconv
> iconv@2.3.0 install /home/max/node_modules/iconv
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/max/node_modules/iconv/build'
gyp ERR! System Linux 4.4.0-116-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/max/node_modules/iconv
gyp ERR! node -v v9.6.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/max/package.json'
npm WARN spam No description
npm WARN spam No repository field.
npm WARN spam No README data
npm WARN spam No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iconv@2.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/max/.npm/_logs/2018-03-01T08_34_32_493Z-debug.log