now_world
now_world

Reputation: 1096

What is npm ERR! code ELIFECYCLE?

I've gotten this same error on two different npm packages and haven't seemed to be able to figure it out. I've checked this answer and I don't have any other servers running. I've also tried deleting my module_packages folder, cleaning npm cache clean and then reinstalling using npm i as many threads have suggested, but I still get the same error.

C:\Users\hunter\Documents\vid>npm install npm install github:storj/node-libstorj --save

> [email protected] preinstall C:\Users\hunter\Documents\vid\node_modules\storj
> node ./download.js

Unable to download libstorj for platform: win32 and arch: x64
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node ./download.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hunter\AppData\Roaming\npm-cache\_logs\2018-03-25T15_44_06_578Z-debug.log

Any ideas on what might be causing the error would be helpful.

Upvotes: 2

Views: 13080

Answers (2)

peter3142
peter3142

Reputation: 1

I was getting a "code ELIFECYCLE" error trying to run "usemin" and "imagemin" node-modules via script entries in package.json. These script entries were given in a Coursera "Full Stack Developer" course: "imagemin": "imagemin img/* -o dist/img/ && "usemin": "usemin index.html -d dist -o dist/index.html",

The first line should have read: "imagemin": "imagemin --out-dir=dist/img/ img/**/*.{png,jpg,git}"

And the issue with usemin giving a "code ELIFECYLE" error was finally traced to the fact that I had installed the API version ("npm install usemin") rather than the cli version ("npm install usemin-cli).

Hope the above helps some other nubbie avoid what now look like an obvious pair of mistakes!

Upvotes: 0

rweisse
rweisse

Reputation: 830

I have good and bad news for you. The good news first: Everythings fine with your computer.

The bad news: The module you would like to install is incompatible with windows operating systems. Have a look at the first line of your error message:

Unable to download libstorj for platform: win32 and arch: x64

There is already an open issue for this problem on GitHub, see: https://github.com/Storj/node-libstorj/issues/43

As mentioned in this issue there are multiple problems:

  • download/unzip not working
  • not compiling because some linux-only functions being used (access function)
  • not linking (it seems nettle and some other link fails)

So you have two options: Wait until this issue gets fixed - or - switch your operating system ;-)

Upvotes: 3

Related Questions