I got Yeoman's generator-angular-fullstack and ran yo angular-fullstack (without Heroku), but then I got these failures and errors:

  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)

and then:

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

I did find jpegtran-bin's github and found a similar issue, which ended with "we're going to include instructions on how to compile manually."

What should I do in the mean time?

有帮助吗?

解决方案

I had this same issue and I updated both yeoman and my Generators and it solved the issue for me.

try running npm update -g yo and then run yo and select the option to update generators.

Note: if you are using an older version of node (< 1.2.10) you have to update bower and grunt-cli separately and make sure its the global version you are updating and not a local version.

其他提示

I had a discussion with the developer for angular-fullstack and he suggested me to do the following because I had problems with mongoose and jpegtran, as well as I did not have a MongoDB server. Angular-fullstack only connects to Mongodb, it doesn't install it for you with the package.

  1. yo angular-fullstack --skip-install
  2. change the following in package.json:

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

  4. npm install
  5. get MongoDB somehow (either install it on my Ubuntu machine or get it hosted from MongoLab or MongoHQ)

But you can just update the generator like jonnieM suggested since at the end of the discussion with angular-fullstack's developer, he fixed the mongoose and jpegtran issues in angular-fullstack..

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top