Home  >  Q&A  >  body text

An error occurred after npm install -g browser-sync. Is there anyone else? I feel like no one has answered the question.

npm WARN deprecated express@2.5.11: express 2.x series is deprecated

npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated

npm ERR! path ../lib/node_modules/browser-sync/bin/browser-sync.js

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall symlink

npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/browser-sync/bin/browser-sync.js' -> '/usr/local/bin/browser-sync'

npm ERR!     at Error (native)

npm ERR!  { Error: EACCES: permission denied, symlink '../lib/node_modules/browser-sync/bin/browser-sync.js' -> '/usr/local/bin/browser-sync'

npm ERR!     at Error (native)

npm ERR!   cause: 

npm ERR!    { Error: EACCES: permission denied, symlink '../lib/node_modules/browser-sync/bin/browser-sync.js' -> '/usr/local/bin/browser-sync'

npm ERR!        at Error (native)

npm ERR!      errno: -13,

npm ERR!      code: 'EACCES',

npm ERR!      syscall: 'symlink',

npm ERR!      path: '../lib/node_modules/browser-sync/bin/browser-sync.js',

npm ERR!      dest: '/usr/local/bin/browser-sync' },

npm ERR!   stack: 'Error: EACCES: permission denied, symlink \'../lib/node_modules/browser-sync/bin/browser-sync.js\' -> \'/usr/local/bin/browser-sync\'\n    at Error (native)',

npm ERR!   errno: -13,

npm ERR!   code: 'EACCES',

npm ERR!   syscall: 'symlink',

npm ERR!   path: '../lib/node_modules/browser-sync/bin/browser-sync.js',

npm ERR!   dest: '/usr/local/bin/browser-sync' }

npm ERR! 

npm ERR! Please try running this command again as root/Administrator.


npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/feifengrifangde/.npm/_logs/2017-09-15T01_05_09_794Z-debug.log


网名最难取网名最难取2614 days ago2140

reply all(4)I'll reply

  • 冷月无声

    冷月无声2017-09-24 11:02:06

    Reinstall your nodd.js, and then install browsersync

    reply
    0
  • 网名最难取

    网名最难取2017-09-15 16:32:06

    The installation was successful. I just found a tutorial and tried adding sudo.

    reply
    0
  • 娴@.@微梦

    I saw what you said and added sudo before npm install -g browser-sync and it was OK.

    娴@.@微梦 · 2018-04-25 18:00:06
  • 天蓬老师

    天蓬老师2017-09-15 16:30:36

    Is node.js installed successfully?

    reply
    1
  • Cancelreply