Search code examples
phphtmllaravellaravel-elixir

npm install laravel-elixir doesn't work


I use laravel for an app. When I tried to install laravel-elixir using npm, I got this error.

    ` C:\OpenServer\domains\kuznets\node_modules\laravel-elixir\node_modules\gulp-sa
    ss\node_modules\node-sass\vendor\win32-x64-46\binding.node ` exists.
     testing binary.
    Binary is fine; exiting.
    npm ERR! Windows_NT 6.3.9600
    npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
    node_modules\\npm\\bin\\npm-cli.js" "install" "laravel-elixir" "--save-dev"
    npm ERR! node v4.4.1
    npm ERR! npm  v2.14.20
    npm ERR! path C:\Users\Ben\AppData\Roaming\npm-cache\marked\0.3.5\package.t
    gz.1968964367
    npm ERR! code EPERM
    npm ERR! errno -4048
    npm ERR! syscall rename

    npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Вениамин\AppDat
    a\Roaming\npm-cache\marked\0.3.5\package.tgz.1968964367' -> 'C:\Users\Вениамин\A
    ppData\Roaming\npm-cache\marked\0.3.5\package.tgz'
    npm ERR!     at Error (native)
    npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\Users\Вениамин\Ap
    pData\Roaming\npm-cache\marked\0.3.5\package.tgz.1968964367' -> 'C:\Users\Вениам
    ин\AppData\Roaming\npm-cache\marked\0.3.5\package.tgz']
    npm ERR!   errno: -4048,
    npm ERR!   code: 'EPERM',
    npm ERR!   syscall: 'rename',
    npm ERR!   path: 'C:\\Users\\Ben\\AppData\\Roaming\\npm-cache\\marked\\0.3.
    5\\package.tgz.1968964367',
    npm ERR!   dest: 'C:\\Users\\Ben\\AppData\\Roaming\\npm-cache\\marked\\0.3.
    5\\package.tgz',
    npm ERR!   parent: 'cli-usage' }
    npm ERR!
    npm ERR! Please try running this command again as root/Administrator.

    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\OpenServer\domains\kuznets\npm-debug.log

How can I solve it? I've never met a problem like this


Solution

  • try this

    sudo npm install laravel-elixir 
    

    or add "-g" after "install"

    or if it does not work

    cd usr/local/lib/node_modules
    

    then install it there