npm fails: EPERM

giacomo.tag's Avatar

giacomo.tag

13 Jan, 2015 07:55 PM

I have some problems with my CI. Sometimes it passes, and sometimes it doesn't.

Here is the appveyor.yml

# appveyor file
# http://www.appveyor.com/docs/appveyor-yml

init:  
  - git config --global core.autocrlf input

# what combinations to test
environment:  
  matrix:
    - nodejs_version: 0.10

install:  
  - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
  - npm install -g grunt-cli bower gulp
  - npm install

build_script:  
  - node --version
  - npm --version
  - grunt testAll --no-color

test: off # tests are done in the build script

Here is the output:

Running "shell:testClient" (shell) task  
npm WARN package.json fmc-spom-client@0.0.1 No repository field.  

> v8flags@1.0.8 install C:\projects\fmc-spom\fmc-spom-client\node_modules\gulp\node_modules\v8flags
> node fetch.js

npm WARN optional dep failed, continuing fsevents@0.3.1  

> ws@0.5.0 install C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild  
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  
  bufferutil.cc
..\src\bufferutil.cc(32): warning C4996: 'NanSymbol': was declared deprecated [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
          C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(1043) : see declaration of 'NanSymbol'
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\bufferutil.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\bufferutil.exp
  Generating code
  Finished generating code
  bufferutil.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\\bufferutil.node
  validation.cc
..\src\validation.cc(112): warning C4996: 'NanSymbol': was declared deprecated [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\validation.vcxproj]
          C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(1043) : see declaration of 'NanSymbol'
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\validation.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\validation.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\validation.exp
  Generating code
  Finished generating code
  validation.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\engine.io\node_modules\ws\build\Release\\validation.node

> ws@0.4.31 install C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild  
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  
  bufferutil.cc
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\bufferutil.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\bufferutil.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\bufferutil.exp
  Generating code
  Finished generating code
  bufferutil.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\\bufferutil.node
  validation.cc
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\validation.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\validation.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\validation.exp
  Generating code
  Finished generating code
  validation.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\browser-sync\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\build\Release\\validation.node

> phantomjs@1.9.13 install C:\projects\fmc-spom\fmc-spom-client\node_modules\karma-phantomjs-launcher\node_modules\phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-windows.zip  
Saving to C:\Users\appveyor\AppData\Local\Temp\1\phantomjs\phantomjs-1.9.8-windows.zip  
Receiving...  

Received 7292K total.  
Extracting zip contents  
Removing C:\projects\fmc-spom\fmc-spom-client\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom  
Copying extracted folder C:\Users\appveyor\AppData\Local\Temp\1\phantomjs\phantomjs-1.9.8-windows.zip-extract-1421177785230\phantomjs-1.9.8-windows -> C:\projects\fmc-spom\fmc-spom-client\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\lib\phantom  
Removing C:\Users\appveyor\AppData\Local\Temp\1\phantomjs\phantomjs-1.9.8-windows.zip-extract-1421177785230  
Writing location.js file  

> ws@0.4.32 install C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild  
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.  
  bufferutil.cc
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\bufferutil.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\bufferutil.exp
  Generating code
  Finished generating code
  bufferutil.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\\bufferutil.node
  validation.cc
C:\Users\appveyor\.node-gyp\0.10.35\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]  
          with
          [
              T=v8::Object
          ]
     Creating library C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\validation.lib and object C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\validation.exp
  Generating code
  Finished generating code
  validation.vcxproj -> C:\projects\fmc-spom\fmc-spom-client\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\Release\\validation.node

> node-sass@1.2.3 install C:\projects\fmc-spom\fmc-spom-client\node_modules\gulp-sass\node_modules\node-sass
> node scripts/install.js

Binary downloaded and installed at C:\projects\fmc-spom\fmc-spom-client\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32\binding.node  

> node-sass@1.2.3 postinstall C:\projects\fmc-spom\fmc-spom-client\node_modules\gulp-sass\node_modules\node-sass
> node scripts/build.js

`win32-ia32` exists; testing
Binary is fine; exiting  
npm ERR! Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock'  
npm ERR!  { [Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock']  
npm ERR!   errno: 50,  
npm ERR!   code: 'EPERM',  
npm ERR!   path: 'C:\\Users\\appveyor\\AppData\\Roaming\\npm-cache\\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock' }  
npm ERR!  
npm ERR! Please try running this command again as root/Administrator.  

npm ERR! System Windows_NT 6.2.9200  
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"  
npm ERR! cwd C:\projects\fmc-spom\fmc-spom-client  
npm ERR! node -v v0.10.35  
npm ERR! npm -v 1.4.28  
npm ERR! path C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock  
npm ERR! code EPERM  
npm ERR! errno 50  
npm ERR! stack Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock'  
npmWarning: Command failed: npm WARN package.json fmc-spom-client@0.0.1 No repository field.  
npm WARN optional dep failed, continuing fsevents@0.3.1  
npm ERR! Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock'  
npm ERR!  { [Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock']  
npm ERR!   errno: 50,  
npm ERR!   code: 'EPERM',  
npm ERR!   path: 'C:\\Users\\appveyor\\AppData\\Roaming\\npm-cache\\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock' }  
npm ERR!  
npm ERR! Please try running this command again as root/Administrator.  

npm ERR! System Windows_NT 6.2.9200  
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"  
npm ERR! cwd C:\projects\fmc-spom\fmc-spom-client  
npm ERR! node -v v0.10.35  
npm ERR! npm -v 1.4.28  
npm ERR! path C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock  
npm ERR! code EPERM  
npm ERR! errno 50  
npm ERR! stack Error: EPERM, open 'C:\Users\appveyor\AppData\Roaming\npm-cache\5f7326ea-m-cache-wrappy-1-0-1-package-tgz.lock'  
npm Use --force to continue.  

Aborted due to warnings.
  1. Support Staff 1 Posted by Feodor Fitsner on 13 Jan, 2015 08:28 PM

    Feodor Fitsner's Avatar

    Apparently, this error is related to some racing condition issues in npm and it could be resolved by installing npm 2.0: https://github.com/appveyor/ci/issues/102#issuecomment-69798303

  2. giacomo.tag closed this discussion on 06 Apr, 2015 02:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac