Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install error code 128

Tags:

git

node.js

npm

I am receiving the following error when trying to run npm install after a fresh install of Node and Git

enter image description here

Anyone have any idea what could be causing it, and what to do to fix it?

package.json (removed company details)

{
    "name": "xxx",
    "version": "1.0.0",
    "description": "xxx",
    "engines": {
        "node": "5.0.0",
        "npm": "3.3.9"
    },
    "repository": "xxx",
    "private": true,
    "license": "UNLICENSED",
    "dependencies": {
        "dijit": "https://github.com/dojo/dijit.git#1.10.4",
        "dojo": "1.10.4",
        "fg-dialog": "0.1.5",
        "politespace": "0.1.4",
        "shoestring": "1.0.3"
    },
    "devDependencies": {
        "body-parser": "^1.14.1",
        "chalk": "^1.1.1",
        "compression": "^1.6.0",
        "del": "^2.0.2",
        "dojo-util": "https://github.com/dojo/util.git#1.10.4",
        "express": "^4.13.3",
        "glob": "^5.0.15",
        "gulp": "^3.9.0",
        "gulp-concat": "^2.6.0",
        "gulp-git": "^1.6.0",
        "gulp-html-minifier": "^0.1.6",
        "gulp-jsbeautifier": "^1.0.1",
        "gulp-jshint": "^1.11.2",
        "gulp-jshint-xml-file-reporter": "^0.5.1",
        "gulp-jsonminify": "^1.0.0",
        "gulp-replace": "^0.5.4",
        "gulp-task-listing": "^1.0.1",
        "gulp-uglify": "^1.4.1",
        "gulp-util": "^3.0.6",
        "gulp-zip": "^3.0.2",
        "intern": "https://github.com/theintern/intern.git",
        "jshint-stylish": "^2.0.1",
        "merge-stream": "^1.0.0",
        "minimist": "^1.2.0",
        "open": "^0.0.5",
        "q": "^1.4.1",
        "request": "^2.65.0",
        "require-dir": "^0.3.0",
        "run-sequence": "^1.1.2",
        "selenium-standalone": "^4.6.3"
    },
    "scripts": {
        "postinstall": "gulp install"
    }
}
like image 758
andy mccullough Avatar asked Jan 26 '16 18:01

andy mccullough


People also ask

Why npm install failed?

code 1 error usually occurs when you run the npm install command. This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer. This means that npm fails to install the node-sass module that's added as a dependency to the n-app project.


1 Answers

A recommended first step is to use the latest npm:

npm install -g npm 

(You may need sudo). You are using npm 2.x, the latest is 3.5.x.

like image 164
Mark Stosberg Avatar answered Sep 21 '22 19:09

Mark Stosberg