DEV Community

SHRAY SALVI
SHRAY SALVI

Posted on

npm run build throw an error, what is NODE_CI

here is package.json from a github repository
datacamp light

{
    "private": false,
    "name": "datacamp-light",
    "version": "2.0.0",
    "description": "Convert any blog or website to an interactive learning platform for data science",
    "main": "dist/dcl-react.js",
    "scripts": {
        "start": "npm run serve",
        "start:dev": "webpack --env=dev",
        "build": "npm run build:prod",
        "build:prod": "NODE_CI=TRUE webpack --env=prod",
        "build:dev": "NODE_CI=TRUE webpack --env=dev",
        "serve": "webpack-dev-server --open --env=serve",
        "test": "cross-env NODE_ENV=development jest",
        "test:watch": "cross-env NODE_ENV=development NODE_PATH=dist jest --watch",
        "test:ci": "npm run test -- --ci --runInBand --coverage --testResultsProcessor='jest-junit' && npm run report-coverage",
        "report-coverage": "codecov",
        "test-and-report": "npm run test -- --coverage && npm run report-coverage",
        "lint:ts": "tslint -p .",
        "lint:ci": "tslint -p . -t junit -o reports/junit/ts-lint-results.xml",
        "precommit": "lint-staged",
        "prettier": "prettier --trailing-comma es5 --write 'src/**/*.{ts,tsx,js,jsx,css,scss}'"
    },
    "author": "Marcel Samyn",
    "license": "GPL-3.0",
    "dependencies": {
        "bluebird": "3.5.1",
        "brace": "git+https://github.com/datacamp/brace.git#v0.10.2",
        "browser-cookies": "1.1.0",
        "golden-layout": "1.5.9",
        "jquery": "3.2.1",
        "lodash": "4.17.10",
        "node-sass": "7.0.1",
        "nodelist-foreach-polyfill": "1.2.0",
        "react": "16.0.0",
        "react-ace": "git+https://github.com/datacamp/react-ace.git#v5.1.1-dc3",
        "react-dom": "16.0.0",
        "react-redux": "5.0.6",
        "redux": "3.7.2",
        "redux-observable": "0.16.0",
        "rxjs": "5.4.3",
        "store": "2.0.12",
        "strip-indent": "2.0.0",
        "universal-rx-request": "1.0.1",
        "xss": "1.0.3"
    },
    "devDependencies": {
        "@fortawesome/fontawesome": "1.1.5",
        "@fortawesome/fontawesome-free-solid": "5.0.10",
        "@types/enzyme": "3.1.10",
        "@types/enzyme-adapter-react-16": "1.0.2",
        "@types/jest": "22.2.3",
        "@types/jquery": "3.2.13",
        "@types/lodash": "4.14.77",
        "@types/react": "16.0.10",
        "@types/react-dom": "16.0.1",
        "@types/react-hot-loader": "3.0.4",
        "@types/react-lazyload": "2.2.5",
        "@types/react-redux": "5.0.10",
        "@types/redux-devtools": "3.0.38",
        "@types/redux-immutable": "3.0.35",
        "@types/storejs": "2.0.0",
        "@types/tapable": "0.2.5",
        "@types/webpack": "3.0.10",
        "@types/webpack-dev-server": "2.4.1",
        "@types/webpack-env": "1.13.0",
        "babel-core": "6.26.0",
        "babel-loader": "7.1.4",
        "babel-plugin-lodash": "3.2.11",
        "babel-plugin-transform-export-extensions": "6.22.0",
        "babel-polyfill": "6.9.1",
        "babel-preset-env": "1.6.0",
        "babel-preset-react": "6.5.0",
        "clean-webpack-plugin": "0.1.16",
        "codecov": "3.0.2",
        "cross-env": "5.0.5",
        "css-loader": "0.28.7",
        "enzyme": "3.3.0",
        "enzyme-adapter-react-16": "1.1.1",
        "enzyme-to-json": "3.1.2",
        "eslint": "3.19.0",
        "eslint-config-prettier": "2.4.0",
        "eslint-plugin-prettier": "2.2.0",
        "eslint-plugin-react": "6.8.0",
        "fork-ts-checker-webpack-plugin": "0.2.8",
        "happypack": "4.0.0",
        "html-webpack-plugin": "3.0.7",
        "husky": "0.14.3",
        "identity-obj-proxy": "3.0.0",
        "ignore-styles": "5.0.1",
        "immutable": "4.0.0-rc.7",
        "jest": "22.4.3",
        "jest-junit": "4.0.0",
        "lint-staged": "4.1.3",
        "lodash-webpack-plugin": "0.11.4",
        "markdown-toc": "1.1.0",
        "prettier": "1.6.1",
        "prettier-webpack-plugin": "0.2.2",
        "react-hot-loader": "3.0.0",
        "react-lazyload": "2.3.0",
        "redux-devtools-extension": "2.13.2",
        "redux-immutable": "4.0.0",
        "redux-mock-store": "1.3.0",
        "rxjs-marbles": "1.6.0",
        "sass-loader": "6.0.6",
        "script-ext-html-webpack-plugin": "1.8.7",
        "style-loader": "0.13.1",
        "stylelint": "8.1.1",
        "stylelint-config-recommended": "1.0.0",
        "stylelint-webpack-plugin": "0.9.0",
        "superagent": "3.8.3",
        "svg-react-loader": "0.4.5",
        "ts-jest": "22.4.6",
        "ts-loader": "2.3.7",
        "tslint": "5.10.0",
        "tslint-config-airbnb": "5.3.0-beta",
        "tslint-config-prettier": "1.5.0",
        "tslint-plugin-prettier": "1.1.0",
        "tslint-react": "3.2.0",
        "typescript": "2.4.2",
        "typescript-fsa": "2.5.0",
        "typescript-fsa-reducers": "0.4.4",
        "typings-for-css-modules-loader": "1.5.0",
        "uglifyjs-webpack-plugin": "1.2.5",
        "webpack": "^3.12.0",
        "webpack-bundle-analyzer": "2.13.1",
        "webpack-dev-server": "2.8.1",
        "webpack-merge": "4.1.0",
        "webpack-notifier": "1.5.0",
        "xterm": "3.4.1"
    },
    "jest": {
        "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
        "testURL": "http://localhost",
        "moduleFileExtensions": [
            "ts",
            "tsx",
            "js",
            "jsx",
            "json",
            "node"
        ],
        "moduleDirectories": [
            "node_modules",
            "vendor"
        ],
        "moduleNameMapper": {
            "\\.(css|scss)$": "identity-obj-proxy",
            "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
        },
        "transform": {
            "^.+\\.tsx?$": "ts-jest"
        },
        "setupFiles": [
            "<rootDir>/src/test-setup.ts"
        ],
        "snapshotSerializers": [
            "enzyme-to-json/serializer"
        ],
        "collectCoverageFrom": [
            "src/**/*.{ts,tsx}"
        ]
    },
    "lint-staged": {
        "*.{js,jsx,json,ts,tsx,css}": [
            "prettier --write --trailing-comma es5",
            "git add"
        ],
        "README.md": [
            "markdown-toc -i",
            "git add"
        ]
    }
}
Enter fullscreen mode Exit fullscreen mode

now If I hit command npm run build it throw an error

Image description

How do I build it on local machine ('npm run build')? Thanks in advance.

Top comments (4)

Collapse
 
thomassloboda profile image
Thomas Sloboda • Edited

Hey,

May be you can try to replace

NODE_CI=TRUE
Enter fullscreen mode Exit fullscreen mode

with

cross-env NODE_CI=TRUE 
Enter fullscreen mode Exit fullscreen mode

Regards

Collapse
 
shraysalvi profile image
SHRAY SALVI • Edited

Thank you, It work

Collapse
 
shraysalvi profile image
SHRAY SALVI

Sir, Can you please help me solving this install-and-run-old-dependency

 
shraysalvi profile image
SHRAY SALVI

Well, I didn't know about this, thanks for telling me the reason behind the problem.