2

我得到了 Yeoman 的generator-angular-fullstack并运行yo angular-fullstack(没有 Heroku),但后来我遇到了这些失败和错误:

  3 failing

  1) jpegtran should successfully proxy jpegtran:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/home/ubuntu/fs_a/node_modules/jpegtran-bin/node_modules/mocha/lib/runnable.js:165:14)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  2) jpegtran should minify a .jpg:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/home/ubuntu/fs_a/node_modules/jpegtran-bin/node_modules/mocha/lib/runnable.js:165:14)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  3) jpegtran "after all" hook:
     Error: ENOENT, no such file or directory 'test/minified.jpg'
      at Object.fs.unlinkSync (fs.js:760:18)
      at Context.<anonymous> (/home/ubuntu/fs_a/node_modules/jpegtran-bin/test/test-path.js:10:6)
      at Hook.Runnable.run (/home/ubuntu/fs_a/node_modules/jpegtran-bin/node_modules/mocha/lib/runnable.js:211:32)
      at next (/home/ubuntu/fs_a/node_modules/jpegtran-bin/node_modules/mocha/lib/runner.js:246:10)
      at Object._onImmediate (/home/ubuntu/fs_a/node_modules/jpegtran-bin/node_modules/mocha/lib/runner.js:258:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)



/home/ubuntu/fs_a/node_modules/jpegtran-bin/build.js:70
                        throw err;
                              ^
Error: Command failed: configure: error: no nasm (Netwide Assembler) found

    at ChildProcess.exithandler (child_process.js:637:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

接着:

npm ERR! jpegtran-bin@0.2.0 postinstall: `node pre-build.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the jpegtran-bin@0.2.0 postinstall script.
npm ERR! This is most likely a problem with the jpegtran-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node pre-build.js
npm ERR! You can get their info via: 
npm ERR!     npm owner ls jpegtran-bin
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/home/ubuntu/local/bin/node" "/home/ubuntu/local/bin/npm" "install"
npm ERR! cwd /home/ubuntu/fs_a
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE

我确实找到了 jpegtran-bin 的 github 并发现了一个类似的问题,以“我们将包含有关如何手动编译的说明”结尾。

在此期间我应该做什么?

4

2 回答 2

1

我遇到了同样的问题,我更新了 yeoman 和我的发电机,它为我解决了这个问题。

尝试运行npm update -g yo,然后运行yo并选择更新生成器的选项。

注意:如果您使用的是旧版本的节点(< 1.2.10),您必须分别更新 bower 和 grunt-cli,并确保它是您正在更新的全局版本而不是本地版本。

于 2014-03-05T13:22:20.323 回答
0

我与开发人员讨论了 angular-fullstack,他建议我执行以下操作,因为我遇到了 mongoose 和 jpegtran 的问题,而且我没有 MongoDB 服务器。Angular-fullstack 仅连接到 Mongodb,它不会随包为您安装它。

  1. yo angular-fullstack --skip-install
  2. 在 package.json 中更改以下内容:

    ...
    "mongoose": "latest"
    ...
    "jpegtran-bin": "latest"
    
  3. bower install

  4. npm install
  5. 以某种方式获取 MongoDB(将其安装在我的 Ubuntu 机器上或从 MongoLab 或 MongoHQ 托管)

但是您可以像jonnieM 建议的那样更新生成器,因为在与 angular-fullstack 的开发人员讨论结束时,他修复了 angular-fullstack 中的 mongoose 和 jpegtran 问题。

于 2014-03-05T15:57:03.343 回答