javascript - NPM not working (Cannot find module 'internal/fs' - nodejs) -
npm error on update. update node version 7.x. npm not working.
i unable locate error, may due -
npm err! cannot find module 'internal/fs'
.
following when run sudo npm update -g
-
npm err! linux 3.13.0-101-generic npm err! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" npm err! node v7.1.0 npm err! npm v3.10.8 npm err! code module_not_found npm err! cannot find module 'internal/fs' npm err! npm err! if need help, may report error at: npm err! <https://github.com/npm/npm/issues>
my /etc/profile.d/nodejs.sh
has following contents:
node_path=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript export node_path
you should able remove npm directory (typically /usr/local/lib/node_modules/npm) , reinstall 1 of official node tarballs, includes npm (you can find latest http://nodejs.org/dist/latest-v7.x/).
did upgrade older version of node?
if so, part of reason why having issue. older versions of graceful-fs
(a dependency of npm) did things no longer available in node v7.
Comments
Post a Comment