javascript - NPM Cannot find module 'safe-buffer' -


since have installed yarn, cannot use npm anymore.

nodejs upgraded. impossible remove npm. every command got same error message:

 module.js:487      throw err;  ^    error: cannot find module 'safe-buffer'      @ function.module._resolvefilename (module.js:485:15)     @ function.module._load (module.js:437:25)    @ module.require (module.js:513:17)     @ require (internal/module.js:11:18)     @ object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:56:14)     @ module._compile (module.js:569:30)      @ object.module._extensions..js (module.js:580:10)     @ module.load (module.js:503:32)     @ trymoduleload (module.js:466:12)     @ function.module._load (module.js:458:3) 

i got: nodejs v8.2.1, yarn v0.27.5 (can't npm -v npm)

already tried:

  • remove node_modules folder projet , re-install using npm install (got same error message).
  • npm upgrade, npm cache clear, npm cache rm, npm install safe buffer

i got 22 lines on file module.js error message talking about, cannot have line 437, 513 or 569 check.

it impossible uninstall npm, re-install nodejs : https://nodejs.org/en/

and it's work.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -