Linux 重新安装后未从maven找到业力

Linux 重新安装后未从maven找到业力,linux,node.js,karma-runner,Linux,Node.js,Karma Runner,我在上一次会议上问了一个问题,但我认为现在的问题略有不同 在完成npm安装-g之后,我运行了我的构建,但它失败了,原因如下: karma start /media/sf_Users/.../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

我在上一次会议上问了一个问题,但我认为现在的问题略有不同

在完成npm安装-g之后,我运行了我的构建,但它失败了,原因如下:

karma start /media/sf_Users/.../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 '/home/<mylogin>/bin/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 
如前所述,my$HOME/bin文件夹中没有node_modules文件夹

npm安装-g的输出可能会有所帮助,即:

npm WARN optional dep failed, continuing fsevents@0.2.1

> 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-1414523124621/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-1414523124621
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
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"})

> 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-chrome-launcher@0.1.5
├── karma-firefox-launcher@0.1.3
├── karma-script-launcher@0.1.0
├── karma-html2js-preprocessor@0.1.0
├── karma-jasmine@0.1.5
├── karma-coffee-preprocessor@0.1.3 (coffee-script@1.7.1)
├── requirejs@2.1.15
├── karma-requirejs@0.2.2
├── karma-phantomjs-launcher@0.1.4 (phantomjs@1.9.12)
├── karma@0.10.10 (di@0.0.1, rimraf@2.1.4, colors@0.6.0-1, graceful-fs@1.2.3, mime@1.2.11, q@0.9.7, minimatch@0.2.14, glob@3.1.21, optimist@0.3.7, chokidar@0.8.4, coffee-script@1.6.3, log4js@0.6.21, lodash@1.1.1, connect@2.8.8, http-proxy@0.10.4, useragent@2.0.10, socket.io@0.9.17)
└── karma-coverage@0.1.5 (dateformat@1.0.8, istanbul@0.1.46, ibrik@1.0.1)

下一步我该怎么办?

Hm,我是不是遗漏了什么?maven在哪里发挥作用?我用maven karma插件运行maven的karma。请注意,这在我使用Cygwin的Windows box上运行得很好,我只是在linux环境下查看我的Windows FS时遇到了问题。我似乎离它越来越近了。我确保没有旧的node_模块树存在,并且npm安装了-g。然后我手动将$NODEJS_HOME/lib/node_modules/node_modules/karma/bin添加到我的路径中。它现在启动了Karma和PhantomJS,但PhantomJS无法获得任何消息,所以它停止了。我会在另一个帖子里问这个问题。