将graceful-fs模块升级到最新版本

时间:2017-02-08 11:52:34

标签: node.js npm

我有一个来自节点的docker容器:6官方图片。 我想尝试这个项目:https://github.com/mozilla/fxa-webrtc-idp

节点版本是6.9.5 npm版本是3.10.10

当我执行npm test时,这就是appairs:

root@3be6ee5c1ab6:/fxa-webrtc-idp# npm test
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.9.5
npm info lifecycle fxa-webrtc-idp@0.64.0~pretest: fxa-webrtc-idp@0.64.0
npm info lifecycle fxa-webrtc-idp@0.64.0~test: fxa-webrtc-idp@0.64.0

> fxa-webrtc-idp@0.64.0 test /fxa-webrtc-idp
> LOG_LEVEL=error grunt test --node-env=test

(node:354) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Running "copyright:app" (copyright) task

Running "eslint:files" (eslint) task


Running "mochaTest:test" (mochaTest) task


  the route /sign
    ✓ returns a 401 when the request is not authenticated
    ✓ returns a signed assertion when the request is authenticated

  the route /
    ✓ should return version information

  the route /__version__
    ✓ should return version information


  4 passing (44ms)


Running "mochaTest:coverage" (mochaTest) task
  Coverage Summary:
  Name                         Stmts   Miss   Cover   Missing
  -----------------------------------------------------------
  lib/app.js                      22      0    100%   
  lib/logging/summary.js          14      3     79%   14,30,31
  lib/routes/index.js              1      0    100%   
  lib/routes/oauthBegin.js         7      2     71%   20,25
  lib/routes/oauthComplete.js      8      2     75%   18,24
  lib/routes/sign.js              10      0    100%   
  lib/routes/verify.js            16      9     44%   14,23,26,27,29,31,32,35,37
  lib/routes/version.js           52      8     85%   34,35,47,48,60,61,74,75
  ===========================================================
  TOTAL                          130     24     82%


Running "mochaTest:travis-cov" (mochaTest) task
Coverage: 81%
Code coverage below threshold: 81 < 95


Execution Time (2017-02-08 11:46:19 UTC)
loading tasks      1s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 58%
eslint:files    432ms  ▇▇▇▇▇▇▇▇▇▇▇▇ 25%
mochaTest:test  287ms  ▇▇▇▇▇▇▇▇ 16%
Total 1.8s

npm info lifecycle fxa-webrtc-idp@0.64.0~test: Failed to exec test script
npm ERR! Test failed.  See above for more details.

当我执行npm ls graceful-fs时,这就是appairs:

root@3be6ee5c1ab6:/fxa-webrtc-idp# npm ls graceful-fs
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.9.5
fxa-webrtc-idp@0.64.0 /fxa-webrtc-idp
+-- grunt@0.4.5
| `-- glob@3.1.21
|   `-- graceful-fs@1.2.3 
+-- grunt-conventional-changelog@5.0.0
| `-- conventional-changelog@0.5.3
|   `-- read-pkg@1.1.0
|     +-- load-json-file@1.1.0
|     | `-- graceful-fs@4.1.11 
|     `-- path-type@1.1.0
|       `-- graceful-fs@4.1.11 
+-- grunt-eslint@17.3.1
| `-- eslint@1.10.3
|   `-- file-entry-cache@1.3.1
|     `-- flat-cache@1.2.2
|       `-- graceful-fs@4.1.11 
+-- grunt-jscs@2.7.0
| `-- jscs@2.9.0
|   `-- babel-jscs@2.0.5
|     `-- babel-core@5.8.38
|       +-- output-file-sync@1.1.2
|       | `-- graceful-fs@4.1.11 
|       `-- regenerator@0.8.40
|         `-- commoner@0.10.8
|           `-- graceful-fs@4.1.11 
+-- grunt-nodemon@0.4.1
| `-- nodemon@1.11.0
|   +-- chokidar@1.6.1
|   | `-- readdirp@2.1.0
|   |   `-- graceful-fs@4.1.11 
|   `-- update-notifier@0.5.0
|     `-- configstore@1.4.0
|       +-- graceful-fs@4.1.11 
|       `-- write-file-atomic@1.3.1
|         `-- graceful-fs@4.1.11 
`-- grunt-nsp@2.1.2
  `-- nsp@2.0.1
    `-- nodesecurity-npm-utils@3.0.0
      `-- silent-npm-registry-client@1.0.0
        `-- npm-registry-client@6.3.3
          `-- graceful-fs@3.0.8 

npm info ok 

我如何解决我的问题?感谢您的支持

1 个答案:

答案 0 :(得分:0)

尝试升级您的npm。它可能会有所帮助,就像它对我有类似的错误一样。请在命令和

下面运行

npm install npm @ latest -g