problems installing npm packages (karma, phantomjs, and dependencies) on CentOS VM

439 views
Skip to first unread message

David Karr

unread,
Oct 30, 2014, 2:59:25 PM10/30/14
to nod...@googlegroups.com
I had earlier posted about issues with "sharing" a node_modules" tree between Win7 and my CentOS VM.  For now, I'm going to assume that this just isn't possible.

So, I renamed my existing "node_modules" tree and tried to reinstall everything on the CentOS VM.

I'm using NPM v1.4.28.

For context, this is my "package.json":
{
 
"name": "dk068x",
 
"version": "0.0.0",
 
"description": "ERROR: No README.md file found!",
 
"main": "karma.conf.js",
 
"dependencies": {
   
"karma-firefox-launcher": "~0.1.0",
   
"karma-coffee-preprocessor": "~0.1.0",
   
"karma-phantomjs-launcher": "~0.1.0",
   
"karma-jasmine": "~0.1.3",
   
"karma": "~0.10.2",
   
"karma-coverage": "~0.1.0",
   
"karma-html2js-preprocessor": "~0.1.0",
   
"karma-script-launcher": "~0.1.0",
   
"karma-requirejs": "~0.2.0",
   
"karma-chrome-launcher": "~0.1.0"
 
},
 
"devDependencies": {
   
"karma": "^0.12.6",
   
"karma-coverage": "^0.1.5",
   
"karma-jasmine": "^0.1.5",
   
"karma-junit-reporter": "^0.2.2",
   
"phantomjs": "^1.9.7-3",
   
"karma-phantomjs-launcher": "^0.1.4",
   
"karma-chrome-launcher": "^0.1.3",
   
"karma-firefox-launcher": "^0.1.3",
   
"karma-ie-launcher": "^0.1.5"
 
},
 
"scripts": {
   
"test": "echo \"Error: no test specified\" && exit 1"
 
},
 
"repository": "",
 
"author": "",
 
"license": "BSD"
}



I first tried just running "npm install -g".  This is what I got from that:
npm WARN optional dep failed, continuing fsevents@0.2.1
npm WARN engine coffee
-script-redux@2.0.0-beta4: wanted: {"node":"0.6.x || 0.8.x"} (current: {"node":"0.10.32","npm":"1.4.28"})
 
> phantomjs@1.9.12 install /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js

Download already available at /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Extracting tar contents (via spawned process)
Removing /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1414694464465/phantomjs-1.9.8-linux-x86_64 -> /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Removing /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1414694464465
Writing location.js file
Done. Phantomjs binary available at /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs
 
> ws@0.4.32 install /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make
: Entering directory `/home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `
/home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git Initialized empty Git repository in /home/<myname>/.npm/_git-remotes/git-github-com-michaelficarra-cscodegen-git-c4b567f3/
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git github.com[0: 192.30.252.129]: errno=Connection timed out
npm ERR! git clone git://github.com/michaelficarra/cscodegen.git fatal: unable to connect a socket (Connection timed out)
npm WARN optional dep failed, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383
<myname>@0.0.0 /home/<myname>/frameworks/node-v0.10.32-linux-x64/lib/node_modules/<myname>
├── karma-chro...@0.1.5
├── karma-scri...@0.1.0
├── karma-firef...@0.1.3
├── karma-html2js...@0.1.0
├── karma-...@0.1.5
├── karma-coffee...@0.1.3 (coffee...@1.7.1)
├── requ...@2.1.15
├── karma-r...@0.2.2
├── karma-phanto...@0.1.4 (phan...@1.9.12)
├── ka...@0.10.10 (d...@0.0.1, rim...@2.1.4, col...@0.6.0-1, grace...@1.2.3, mi...@1.2.11, q...@0.9.7, mini...@0.2.14, gl...@3.1.21, opti...@0.3.7, coffee...@1.6.3, chok...@0.8.4, log...@0.6.21, lod...@1.1.1, con...@2.8.8, http-...@0.10.4, user...@2.0.10, sock...@0.9.17)
└── karma-c...@0.1.5 (datef...@1.0.8, ista...@0.1.46, ib...@1.0.1)


Then, when I run my Maven build, which tries to run "karma", it does this:
karma start /media/sf_Users/dk068x/workspace2/SunlightGUI/src/test/webapp/js/karma.conf.js --browsers PhantomJS --reporters dots,junit,coverage --single-run --no-auto-watch --colors false
+ basedir=.
+ case `uname` in
++ uname
+ '[' -x ./node ']'
+ node ./node_modules/karma/bin/karma start /media/sf_Users/dk068x/workspace2/SunlightGUI/src/test/webapp/js/karma.conf.js --browsers PhantomJS --reporters dots,junit,coverage --single-run --no-auto-watch --colors false
 
module.js:340
   
throw err;
         
^
Error: Cannot find module '/media/sf_Users/dk068x/workspace2/SunlightGUI/node_modules/karma/bin/karma'
    at
Function.Module._resolveFilename (module.js:338:15)
    at
Function.Module._load (module.js:280:25)
    at
Function.Module.runMain (module.js:497:10)
    at startup
(node.js:119:16)
    at node
.js:906:3
+ ret=8
+ exit 8

This error isn't too surprising, as the run of "npm install -g" doesn't actually create a "node_modules" folder in this project. Perhaps that shouldn't be surprising, but my build isn't prepared for that.

So I instead tried to do "npm install". This gave me the following:
npm WARN package.json <myname>@0.0.0 No repository field.
npm WARN
package.json <myname>@0.0.0 No README data
npm WARN engine coffee
-script-redux@2.0.0-beta4: wanted: {"node":"0.6.x || 0.8.x"} (current: {"node":"0.10.32","npm":"1.4.28"})
npm WARN optional dep failed
, continuing fsevents@0.3.0
npm ERR
! git clone git://github.com/michaelficarra/cscodegen.git Initialized empty Git repository in /home/<myname>/.npm/_git-remotes/git-github-com-michaelficarra-cscodegen-git-c4b567f3/
npm ERR
! git clone git://github.com/michaelficarra/cscodegen.git
npm ERR
! git clone git://github.com/michaelficarra/cscodegen.git github.com[0: 192.30.252.131]: errno=Connection timed out
npm ERR
! git clone git://github.com/michaelficarra/cscodegen.git fatal: unable to connect a socket (Connection timed out)
npm WARN optional dep failed
, continuing cscodegen@git://github.com/michaelficarra/cscodegen.git#73fd7202ac086c26f18c9d56f025b18b3c6f5383
npm WARN optional dep failed
, continuing escodegen@0.0.28
npm WARN optional dep failed
, continuing esmangle@0.0.17
npm ERR
! rofs EROFS, symlink '../coffee-script/bin/coffee'
npm ERR
! rofs This is most likely not a problem with npm itself
npm ERR
! rofs and is related to the file system being read-only.
npm ERR
! rofs
npm ERR
! rofs Often virtualized file systems, or other file systems
npm ERR
! rofs that don't support symlinks, give this error.

npm ERR! System Linux 2.6.32-431.23.3.el6.x86_64
npm ERR! command "/home/<myname>/frameworks/node-v0.10.32-linux-x64/bin/node" "/home/<myname>/frameworks/node-v0.10.32-linux-x64/bin/npm" "install"
npm ERR! cwd /media/sf_Users/<myname>/workspace2/SunlightGUI
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path ../coffee-script/bin/coffee
npm ERR! code EROFS
npm ERR! errno 56
npm ERR! not ok code 0

This produces a local "node_modules" tree, but no "karma" folder, so Karma fails to start when I run the build.
Reply all
Reply to author
Forward
0 new messages